We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8822
    • 203 Posts
    Hi there, i have just logged onto the manager for a website that has not been updated in a while, and it will not display the contents of the 'Templates' folder, meaning that i can't change the templates (which i really need to do). The main website is working fine and the templates are there, since they are listed in the 'Templates' drop down when you create a new resource.

    Anyone come across this before or know what i can do to resolve, it is really important?

    Thanks for your help
    Emily
      • 3749
      • 24,544 Posts
      The first thing to try is manually deleting all files in the core/cache directory.

      Next, try turning off the compress_js and compress_css System Settings.

      If neither of those works, you may not have the necessary permissions. Make yourself a sudo user on the Create/Edit User panel, then flush permissions, flush sessions, and log back in.

      If that doesn't solve the problem, it's not a permission issue. Try repairing the modx_site_templates table in the DB in PhpMyAdmin.

        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
        • 8822
        • 203 Posts
        Thanks Bob, i will try this. I have just been notified though that the website has been hacked. There are a number of references in the source to spam websites, which must have been added to the page templates. I expect that the hacker has now done something to prevent the templates from being displayed, so that these can't be removed. Any ideas? Have you come across this type of hacking before? I have heard reports before that often when this is done there is also some code put in place to keep re-generating the links, any ideas on how to prevent this as well?

        Have you written any articles on what to do with MODX in the event of a hack?

        Thanks for your help!
        Emily
          • 3749
          • 24,544 Posts
          I haven't, mainly because I've never had the experience of de-hacking a site. It's also difficult to give generic advice because there are so many different ways of hacking a site.

          I'm guessing that you have an early 2.1 version of MODX. There are some known security issues in those versions.


          • Check to see if you have any users that shouldn't exist and delete them.
          • See if you have a plugin called "Core Services" and delete it if you do.
          • Look for other plugins that you didn't install.
          • Check the index.php file in the MODX root for suspicious code.
          • Change all your usernames and passwords (MODX, cPanel, Database, FTP)
          • Delete all files in the core/cache directory.

            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
            • 8822
            • 203 Posts
            Hi BobRay, thanks for taking the time to respond. I had found a thread that discussed exactly what the hacking issue was - the Core Services plugin hack. I have now fixed the websites. Templates still not showing in the manager, but at least the hack is sorted.

            The website is however using version 2.2.0 and i really need to upgrade it - am i right in assuming that it should just be a simple upgrade to the latest version, using the instructions in: https://rtfm.modx.com/revolution/2.x/administering-your-site/upgrading-modx ?
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Easier to install BobRay's UpgradeMODX dashboard widget. It downloads, extracts, and places the files where they need to be, then forwards you to the setup screen.
                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
                • 3749
                • 24,544 Posts
                Upgrading is a good idea and the extra should make it easy.

                I wouldn't recommend going from 2.2.0 to the current version in one jump, though. That's a huge jump and some steps might be missed.

                I would try this sequence: 2.2.16, 2.3.0, 2.3.6. 2.4.2
                  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