We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    Oiy...

    A long time ago, I had added a custom Module to count page hits. Well, today I deleted it because I wasn’t using it (so I thought). Now I can’t see my site! I get :

    « 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 page_hit_counter (page_id, page_count) VALUES (, 1) ON DUPLICATE KEY UPDATE page_count=page_count+1 


    I deleted the module using the manager control panel, and I deleted the directory that was added in the assets/modules/ folder.

    I grep’ed through my code-base for any instances of "page_hit_counter" or "page_count", and I only found:
    /assets/cache/siteCache.idx.php

    I deleted the custom hack that was in that file for the module.... but each time I refresh the page, that file reverts to where it was (which includes the page_hit_count hack).

    AACK!! This thing won’t die. Where is it being resurrected from? Anyone have any experience with this?

    Many, many thanks.


    I emptied the cache using the Manager control panel... but still the site is down.
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Yes, I’m sure it was a Module. Still can’t find how that cache file keeps getting re-written.

        • 3749
        • 24,544 Posts
        Maybe there is an associated plugin that’s still functioning.

          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
          • 25663 MODX Staff
          • 12,272 Posts
          Sounds like a plugin indeed.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 4310
            • 2,310 Posts
            The module PageHitCounter has a companion plugin named CountPageHit.
            Delete/disable the plugin and see if that fixes it.
            Personally I never delete plugins and modules, just disable them.
            That way when I/client have a change of heart it’s easy to turn them on again. wink
              • 9207 ☆ A M B ☆
              • 2,475 Posts
              THANKS! Yep, I totally forgot to delete the Plugin associated with this. That’s why the cache file kept on re-appearing. Shouts out to the forum folks for helping me out.
                • 3749
                • 24,544 Posts
                Quote from: Everettg_99 at Nov 27, 2008, 01:22 PM

                THANKS! Yep, I totally forgot to delete the Plugin associated with this. That’s why the cache file kept on re-appearing. Shouts out to the forum folks for helping me out.
                I’m glad you got it sorted. laugh
                  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