We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 54555
    • 2 Posts
    I recently moved my modx website to a new server. I then edited many files to reflect the fact the company name has changed.

    This included editing many template files. Every template file except one opens perfectly.

    The website works perfectly, even the page using the template that will not open.

    The template that does not open in manager shows a white screen. If I view page source in Chrome, the HTML tags switch over to uncoloured tags, like there is a error in the HTML preventing it from displaying the body of the page.

    This template worked in Manager before I edited the code and saved it, and now I can't edit it a second time because of this white screen.

    Is there a way to edit the contents of the template, without using the manager? As I'm guessing there's an error in my template code that is causing this behavior.
      • 53161
      • 130 Posts
      Do you have PHP snippets in the template? Sounds like a PHP error to me.
        • 3749
        • 24,544 Posts
        You should be able to edit it in the DB in the modx_site_templates table with PhpMyAdmin.

        The fact that you can't save it suggests that it could be an issue with mod_security.
          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
          • 46886
          • 1,154 Posts
          Yes being able to open/save only some files is a signal of mod_security.

          Do you have text-heavy content there? You might ask your hoster if they had any rules get triggered
            • 54555
            • 2 Posts
            Would you believe it’s because I commented out a few lines of the template?

            Seems you can’t use comments...

            Edited in th dB and all resolved.

            Thanks guys
              • 3749
              • 24,544 Posts
              That definitely sounds like an overzealous mod_security rule. I would ask the host to change it.

              Since the mod_security rules are probably strict, you may also run into other problems with mod_security down the road. It's almost always the culprit when one MODX object won't save.
                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