We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42701
    • 47 Posts
    Hi,

    I am trying to create a ModX site on a secure server (https). I have access to the modx dashboard and can go into the elements section and add new TVs, Snippets, and Chunks. Problem is, the secure server won't save Chunks in html that are more that forty or so chars long. When I try to save anything longer, I get an error of "You don't have permission to access /modx/connectors/element/chunk.php". Has anyone else encountered this error/know how to solve it? Thanks!
      • 22303 MODX Staff
      • 10,725 Posts
      Check for mod_security and/or suhosin restrictions, or web server/SSL configuration that restricts the size of the POST request body.
        • 42701
        • 47 Posts
        Quote from: opengeek at Mar 24, 2013, 09:29 AM
        Check for mod_security and/or suhosin restrictions, or web server/SSL configuration that restricts the size of the POST request body.

        Thanks for the advice. Unfortunately we don't have access to the web server.

        UPDATE: We've isolated the problem. The POST data will take one ">" bracket but not two or more. Escaping each open bracket after the first with a forward slash will submit the Chunks and Snippets. A possible solution would be to create a snippet that "unescapes" all the ">"'s, but we really don't want to have to resort to this!
          • 42701
          • 47 Posts
          I checked phpinfo() via System Settings in ModX, and found that mod_security2 is enabled. I googled it, but couldn't come up with anything specific about restricting ">" signs (see above post). Didn't see anything about suhosin. We don't own this server, so disabling modules in PHP might be restricted. Is it likely that mod_security2 is the problem, and if so what would we have to do to remedy it?

          Thanks
            • 3749
            • 24,544 Posts
            If you ask, the host might disable that mod_security rule for you (or not). I think that's the only solution short of escaping and unescaping them (or entifying and de-entifying them) or switching hosts.
              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
              • 42701
              • 47 Posts
              Thanks OpenGeek and Bob, I'm in the process of having the host fix the problem.