We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17895
    • 209 Posts
    Hi all,
    I just upgraded one of my sites, and there is a problem, now: I cannot add new snippets, because when I click on SAVE button, it redirects me to the main page (I think it could be a "page not found" stuff)

    To upgrade, I uploaded the 0.9.2.1 files directly to the server, then run /install directory (and then delete /install)

    Any ideas?
      Daniele "MadMage" Calisi
      • 17895
      • 209 Posts
      I remember now that I found the same problem upgrading another site from 0.9.2.1 to 0.9.5
        Daniele "MadMage" Calisi
        • 22303 MODX Staff
        • 10,725 Posts
        There was an 0.9.0? Sheesh, been so long ago I couldn’t remember. wink

        First, the page not found stuff has nothing to do with the manager, so not sure where you were going with that. But it sounds to me like either some of the files didn’t get uploaded properly especially in the manager area, or the data structures are missing something (though I can’t think of any db changes to the site_snippets table off the top of my head).

        Not much else I can say about it without access to the installation or more details about the problem. Not even sure I understand what you say it’s doing. Which main page is it redirecting you too? The manager home? Or the main page in the front-end of your site? If the latter, you definitely have some kind of htaccess or other configuration issue.

        Finally, I’ve upgraded a lot of 0.9.2.1 sites to various betas in the last week or two, and never experienced anything similar to this, so I believe this may be something unique to your sites or environment.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I believe this is the "mod_security" issue; there is something in the snippet that the mod_security settings for your Apache server doesn’t like. Sometimes it will just throw an error message, sometimes it will send you to the "main" page (in this case, Manager home), I guess that depends on the server settings.
            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
            • 22303 MODX Staff
            • 10,725 Posts
            Confirmed Susan; I was able to create a snippet with "return ’test!’;" on madmage’s installation just fine. It does appear to be a mod_security issue.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Usually the snippet that cause this problem involve email, such as eForm, or any of the snippets that send notification or cofirmation emails.
                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
                • 12652
                • 228 Posts
                Try adding an .htaccess file within the manager folder and add

                <IfModule mod_security.c>
                SecFilterEngine Off
                </IfModule>
                


                You can of course comment it back out after you get everything installed and upgraded, and then just keep this in mind if you experience issues in the future adding anything.
                  | Identity Developments delivers SEO focused web design and web presence services
                  - it&#39;s not about websites, it&#39;s about your identity. |