We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1778
    • 659 Posts
    Quote from: BobRay at Aug 23, 2009, 08:58 PM

    Note that for the following code, you need to set $resource first either with $resource = $modx->getObject(’modResource’,$id) or, for the current resource: $resource = $modx->resource;

    $resource = $modx->getObject(’modResource’,$id) does NOT work, but $resource = $modx->getObject(’modDocument’,$id) works fine...
    Any clue ?

    ... But it resolves nothing for the TVs problems...
      • 3749
      • 24,544 Posts
      Quote from: anso at Aug 27, 2009, 04:19 AM

      $resource = $modx->getObject(’modResource’,$id) does NOT work, but $resource = $modx->getObject(’modDocument’,$id) works fine...
      Any clue ?
      ... But it resolves nothing for the TVs problems...

      That’s really odd because modDocument is a descendant of modResource that adds no extra methods. It’s essentially a clone of modResource.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 1778
        • 659 Posts
        another mystery...
        Did you find what is wrong with the $tv->setValue($resource->get(’id’), ’new value’)?
        Cheers
          • 1778
          • 659 Posts
          Shame on me ! ....
          $resource = $modx->getObject(’modResource’,$id) works fine... when I write ’Resource’ with the correct spelling...
          Sorry sad
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: anso at Aug 27, 2009, 05:14 AM

            another mystery...
            Did you find what is wrong with the $tv->setValue($resource->get(’id’), ’new value’)?
            Cheers
            Not yet, if you wouldn’t mind, can you create a ticket in Jira with the test code and information about this not working for you?
              • 1778
              • 659 Posts
              Issue created in JIRA (MODX-1189).
              Hope it’s clear.
              I tried with text TV, checkboxes TV, radiobutton... No result sad
                • 3749
                • 24,544 Posts
                Anso, What MySQL version does MODx report for you when you go to Reports | SystemInfo | View?
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 1778
                  • 659 Posts
                  Hello BobRay,

                  In Reports | SystemInfo | View I got this line :

                  ’Client API version mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $ ’

                  Is it what your talking about or you need more (or others) info ?

                  Cheers

                  By the way did you test to uncheck checkboxes as I explain in my topic ’[revo-Beta3] - problem with TV’ do you have the same (no)result ? Maybe because of the same bug... a problem with ’removing’ the line in DB...

                    • 22303 MODX Staff
                    • 10,725 Posts
                    I would be helpful to know your MySQL server version as well. But FYI, I do not recommend using the new mysqlnd client API yet; it is still very new and IMO, quite unstable (and thus unusable). I would stick with libmysql until mysqlnd matures and stabilizes.
                      • 1778
                      • 659 Posts
                      Server Version# 5.1.36-community-log
                      Protocol version# 10

                      The mysqlnd client API is the default client API when installing WAMP 2.0.