We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25357
    • 92 Posts
    MODx Revolution 2.0.7-pl (traditional) Linux Dream Host VPS

    So I’m working along, been updating records all day long, logged in fine, just about to finish my day, I go to save / update a resource . . .

    Access Denied. No helpful message, nothing. No indication of why. Just "access denied."

    Logged out. Back in. Try to edit any resource. Access denied.

    What is that and how can I fix it?

      • 25357
      • 92 Posts
      More info.

      It’s allowing me to modify and update elements such as chunks and snippets, but no resources or pages. The resource menus are gone. Nothing had changed, just been working along on this web site, updating records. WTF . . .

      <facepalm>

      Problem solved. I was led to the solution by this thread

      http://modxcms.com/forums/index.php/topic,52473.msg303958.htm

      Though it is not a browser cache issue. We are in the final stages of finishing up a site, applying SEO rules and I was instructed to redirect index.php to /. This rewrite rule, inserted after old URL rewrites and before the !-d and !f directive,

      #RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
      #RewriteRule ^(([^/]+/)*)index\.php$ http://www.example.com/$1 [R=301,L]

      Which redirects any directories request for index.php to it’s parent directory (Yeah, <facepalm X10> )

      Apparently this fuggered up the admin context. Odd though that it was **just** the resources that were all affected and I could still modify elements.

      Obviously . . . change the rule so it only redirects at root.

      RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
      RewriteRule ^index\.php$ http://www.example.com/$1 [R=301,L]

        • 1626
        • 31 Posts
        The above reply does not work for me. I'm using MODx 2.2.8-pl. I started getting access denied on editing or creating "Resources" pages while saving them. So basically nothing saves and nothing new can be created. How do I sort this out?
          • 1626
          • 31 Posts
          Quite weird. Suddenly it is working again after logging out for a second time and logging back in again.
          • Are you trying to save the same content as before? Sometimes this kind of thing can be caused by suhosin, mod_security or other server security applications.
              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
              • 1626
              • 31 Posts
              No, this was happening even with a new resource.
              But if I am trying to edit/save the same content as before, and I face this problem, what are the right steps to the solution?
              • When this happens to one of our clients, it's a case of the hosting company updating mod_security and reenabling it on their account. Sometimes you can save, sometimes not. We ask tech support to disable mod_security for the account and everything is normal again.
                  • 1626
                  • 31 Posts
                  Will make sure I do that when this happens again.