We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30585
    • 833 Posts
    Hi guys,

    When I visit my home page to make sure the site is offline after shutting it down for a quick maintenance, I’m getting a SQL syntax error.

    « 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 ’ 1) ON DUPLICATE KEY UPDATE page_count=page_count+1’ at line 1 »
    SQL: INSERT INTO modx_page_hit_counter (page_id, page_count) VALUES (, 1) ON DUPLICATE KEY UPDATE page_count=page_count+1

    I suspect it’s an error with a duplicate primary key, but I’m quiet lost as to what tha heck I’m supposed to do.

    I’m hosted by an Apache 2.2 server running PHP 5.2.3; MySQL 5.0.45 a
    I’m running the lates MODx version a.k.a 0.9.6.2

    Any help?

    Thanks already
      A MODx Fanatic
      • 25663 MODX Staff
      • 12,272 Posts
      It’s a problem with the page hit counter plugin. Disable it temporarily and check to see if the site works. If so you know where to start digging. smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 30585
        • 833 Posts
        Quote from: rthrash at Oct 30, 2008, 09:24 PM

        It’s a problem with the page hit counter plugin. Disable it temporarily and check to see if the site works. If so you know where to start digging. smiley

        I missed that one.

        Let me check, thanks by the way, I appreciate your great help
          A MODx Fanatic