We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11541
    • 26 Posts
    I went from things working well to death. I don’t even know where to look.

    I was editing a page when it happened, but can’t fathom what I changed on a page to cause this:

    « 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 ’’ at line 1 »
    SQL: SELECT published FROM `bcclique_bcportal`.bcportal_site_content WHERE id=
    [Copy SQL to ClipBoard]

    Parser timing
    MySQL: 0.0005 s (2 Requests)
    PHP: 1165649454.3476 s
    Total: 1165649454.3481 s


    I don’t even know where to start!

    Thanks for any help!
      • 11541
      • 26 Posts
      Clicking on the "copy to clipboard" does nothing, btw.

        • 11541
        • 26 Posts
        I deleted a portion of the template I was working on - that seemed to let the site become accessible again.

        However - I still get the error shown in the attachment. This shows up in the Manager on the home page of the Manager.

          • 33337
          • 3,975 Posts
          Your php version? MySql version? ... list of snippets you are using on that page etc..
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 33372
            • 1,611 Posts
            Quote from: guyanonymous at Dec 09, 2006, 01:33 AM


            [b]« 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 ’’ at line 1 »
            SQL: SELECT published FROM `bcclique_bcportal`.bcportal_site_content WHERE id=
            [Copy SQL to ClipBoard]


            Well, the document id is missing from this SQL query, so that’s why you’re getting an error.

            Does clicking on any document in the manager give you this? Or just one of them in particular? Have you tried just refreshing the document tree (or refreshing the manager page altogether)?

            To me it just looks as if the links that are being created in the document tree are broken for some reason, and given that the ids seem to be showing in parenthesis next to each document in the image that you posted I assume that they are there in the database (it’s not corrupted or anything like that), but the page just didn’t load properly for some reason.
              "Things are not what they appear to be; nor are they otherwise." - Buddha

              "Well, gee, Buddha - that wasn't very helpful..." - ZAP

              Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
              • 11541
              • 26 Posts
              This is what leaves me confused.

              None of the individual pages give this error - it’s only in the Manager now when I end up on the "home" page of manager (e.g., after saving anything in configuration; after hitting Site/Home).

              Operating system Linux
              Kernel version 2.6.17-11_4.BHsmp
              Apache version 1.3.37 (Unix)
              PERL version 5.8.5
              PHP version 4.4.4
              MySQL version 4.1.21-standard-log

              I recognize this must be from something I did - it’s just I have no idea what.

                • 25663 MODX Staff
                • 12,272 Posts
                Try clearing your event log (I suspect it’s now huge): Reports > System Events > Clear Log button
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 22303 MODX Staff
                  • 10,725 Posts
                  Looks like the new check to make sure you have a valid start_page, error_page, and unauthorized_page is dying. In fact, it needs to first check if there is a valid id specified before it even executes that query. Add a valid error_page or unauthorized_page to your Tools --> Configuration and the problem should go away...
                    • 11541
                    • 26 Posts
                    BINGO!

                    It was the error page. All is good now!


                    Thanks!

                    Now on to solve my other confusions laugh