We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36551
    • 416 Posts
    This error message has been filling the error log on one of my sites. Any idea how to track this down?


    [2016-12-30 13:36:27] (ERROR @ /home/content/xxxxxxx/html/core/xpdo/om/xpdoobject.class.php : 240) Error 42S22 executing statement:
    Array
    (
    [0] => 42S22
    [1] => 1054
    [2] => Unknown column 'name' in 'order clause'
    )
      • 3749
      • 24,544 Posts
        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
        • 36551
        • 416 Posts
        I upgraded the site back in August from 2.2.(something) to 2.3, 2.4.2, 2.4.4 and then to 2.5.0 where is stands now. It's possible I messed up somewhere along the way there. I don't know when these started appearing so I don't know if this might be related to the upgrades.

        The example errors in your article specify the table in question, the errors I'm seeing don't indicate what table is missing the column. So I'm not sure where to start.

        I've considered disabling all the plugins one by one to see if I can narrow it down some, but it's a production site, so I need to be careful.

        Any other ideas?
          • 3749
          • 24,544 Posts
          Look at the modx_context table in the DB with PhpMyAdmin and see if it has a name field. If not, add it as described in the Blog article.
            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
            • 36551
            • 416 Posts
            Thanks Bob

            The modx_context did have a name column but the value was blank. So I added web and mgr to the name field in both rows of the table.

            The original error message is no longer being generated. However, a new message is appearing.

            [2017-01-04 09:15:03] (ERROR @ /home/content/xxxxxx/html/core/xpdo/xpdo.class.php : 946) xPDO->removeObject - Error deleting modDbRegisterMessage instance using query DELETE FROM `modx_register_messages` WHERE ( `modx_register_messages`.`topic` = 1 AND `modx_register_messages`.`id` = '43ec517d68b6edd3015b3edc9a11367b' )

            When I attempt to look at that table, I'm able to view the structure, but the browse view is not available (red X on hover).
              • 3749
              • 24,544 Posts
              Try repairing that table and manually deleting the cache files.

              Do you have the MessageManager extra installed?

              Are there messages in the Manager's message system that you can see?

              That table is probably empty (hence the error when trying to delete an entry). If nothing else works and you keep getting the message, you could try adding a new record in the modx_register_messages table in the DB:

              topic: 1
              id: 43ec517d68b6edd3015b3edc9a11367b
                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
                • 36551
                • 416 Posts
                Bob

                Just circling back to this now. I don't have MessageManager installed. I've added a record to the modx_register_messages table as instructed.

                I'm still getting the same errors.

                Any other thoughts?
                  • 3749
                  • 24,544 Posts
                  That's pretty baffling. I just spent some time digging through the MODX code and the only place I can find an attempt to delete a modUserMessage is in the code of the MessageManager extra.

                  IIRC, MessageManager was inspired by some work I did for you a long time ago, so maybe it's not called MessageManager.
                    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