We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    It shouldn’t be crashing the server, still. I did some testing and it is sending no value as the pageid since getDocumentIdentifier(’id’) fails in a snippet if you are using friendly urls. But this causing an Apache crash indicates you have a bug or driver incompatibility in the PHP/MySQL layer (i.e. PDO) of the configuration you are using, because sending that query should not crash the server by any means.

    I’m checking in an modification to keep it from issuing that query regardless, to avoid the problem where we can and do know about it, though it won’t make the component work. wink
      • 3749
      • 24,544 Posts
      Quote from: OpenGeek at Dec 09, 2008, 05:51 PM

      It shouldn’t be crashing the server, still. I did some testing and it is sending no value as the pageid since getDocumentIdentifier(’id’) fails in a snippet if you are using friendly urls. But this causing an Apache crash indicates you have a bug or driver incompatibility in the PHP/MySQL layer (i.e. PDO) of the configuration you are using, because sending that query should not crash the server by any means.

      I’m checking in an modification to keep it from issuing that query regardless, to avoid the problem where we can and do know about it, though it won’t make the component work. wink

      Friendly URLs have been off the whole time and I can echo the correct ID in the snippet.

      I’m sure you’re right about a bug or driver incompatibility because Apache does crash periodically in all my installs when using the Manager, usually on a save.

      I tried the snippet exactly as it is above (cached or uncached), with FURLs off on a fresh install of XAMPP 1.6.8 and a fresh SVN checkout/build/install of MODx and it crashes Apache. The crash occurs whether the snippet call is in the template or the document content.

      Reverting to an earlier version of Apache made no difference. I’m starting to think it may be a conflict between MODx (or XPDO) and Vista Ultimate.

      It crashes so reliably with that snippet that I thought it might provide a clue on what’s going on with Apache, but so far I’m in the dark. Let me know if you can think of anything I can test.
        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
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: BobRay at Dec 09, 2008, 05:48 PM

        And it might be a good idea to use an underscore ($_getDocumentIdentifier() ) for functions that are for internal use only.
        This is indeed my standard; however, this was a legacy function from the DocumentParser class that was never intended as a public API method, and if renamed would have further complicated the migration process from 0.9.x to Revolution. But it is properly deprecated in the modX class now and will be removed, as indicated by the documentation for that function, in Revolution 2.1.
          • 3749
          • 24,544 Posts
          Quote from: OpenGeek at Dec 10, 2008, 01:27 PM

          Quote from: BobRay at Dec 09, 2008, 05:48 PM

          And it might be a good idea to use an underscore ($_getDocumentIdentifier() ) for functions that are for internal use only.
          This is indeed my standard; however, this was a legacy function from the DocumentParser class that was never intended as a public API method, and if renamed would have further complicated the migration process from 0.9.x to Revolution.

          I figured as much, but thought this might be our only chance to make that change to the legacy internal functions, an important one, IMO, since we can’t designate them as private or protected.
            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