We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8164
    • 51 Posts
    A site that has been running fine (slow because of the hosting company, but fine otherwise) now gives me this error on the home page ( http://www.nebraskaarthritis.com ):

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ’WHERE `nebraska_managerCMS`.modx_site_content.pub_date < 115613 »
    SQL: UPDATE `nebraska_managerCMS`.modx_site_content SET published=1, publishedon=1156137188, publishedby= WHERE `nebraska_managerCMS`.modx_site_content.pub_date < 1156133588 AND `nebraska_managerCMS`.modx_site_content.pub_date!=0


    Can anybody tell me what happened, or provide any clue? None of the files, to my knowledge, have been changed or altered.

    Duane

    Quick Follow-Up: I turned off Friendly URLs and the parser error went away. I’m very confused about what is happening, and why it happened out of the blue.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Did your hosting company just update their MySQL to a new version?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 18397
        • 3,250 Posts
        The publishedby field is empty if you look at the query. Try refreshing the cache and manually publish documents needing to be published.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          The parser automatically runs this query on every page request. If the MySQL version has been upgraded, and is in STRICT mode, any query trying to insert an empty value into a field marked NOT NULL will abort the query with an error.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 8164
            • 51 Posts
            Susan and Mark...thank you very much for the help. Every problem seems to be a learning experience for me, LOL.

            Just to make sure this is solved and will show up in search, here’s what I did:

            I refreshed the cache and all seems well now. I’ll check with the hosting company to see if they did any updating.

            So, if I’m inferring correctly, an update of the MySQL version can cause this to happen? Because, if I understand correctly, the cached pages don’t return a published-on value and that field is set to Not Null?

            Thanks again for your help. Trying to understand the unfamiliar environment of PHP/MySQL servers is something I’m working to get a grasp on.

            Duane