We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6038
    • 228 Posts
    Im trying to save a chunk, and its not happening.
    It contains some javascript (to add a google map) and I've found that if i remove the closing script tag from the end, it saves with the normal 'success' message. But if I add the closing script tag then it will not save (although no error or success message is given).
    I have codemirror installed but have turned this off and the behaviour is the same.
    Here is a screenshot of the chunk I am saving:
    http://cl.ly/2h0j0U2D0j1w053T3a07
    This screenshot shows the chunk minus the closing script tag. I'm using the html5 implementation of the script tag (ie no need to declare script type)

    The behaviour seems similar to what is reported in this bug:
    http://bugs.modx.com/issues/4227

    I'm wondering what I'm seeing is also a bug? Or the same bug?


    Using MODX 2.1.3
    PHP 5.2.9 - safe mode off, reg globals off, magic_quotes_gpc Off
    Apache/1.3.41
    Linux


    • Sounds like a mod_security rule is blocking the content as mentioned in the closed issue you referenced.
        • 6038
        • 228 Posts
        indeed it was, i turned it off in my .htaccess file with
        SecFilterEngine Off

        and suddenly i could save it.
        As that code turns it off globally, there is a better way to turn it off for a single ip address like so:
        SetEnvIfNoCase Remote_Addr ^208\.113\.183\.103$ MODSEC_ENABLE=Off

        For more info on controlling mod_security in .htaccess see http://www.askapache.com/htaccess/modsecurity-htaccess-tricks.html

        now why didn't i try that last night after finding that bug report? well it was late i suppose.... smiley
        thanks og! [ed. note: christianhanvey last edited this post 12 years, 5 months ago.]
          • 39649
          • 17 Posts
          clutchmarketing Reply #4, 12 years ago
          Hi, I tried including
          SecFilterEngine Off
          in my htaccess file, but it give me an internal server error.

          I tried using it as
          <IfModule mod_security.c>
          SecFilterEngine Off
          </IfModule>

          which didn't create a server error, but did not resolve the issue either. Any suggestions?
            • 39649
            • 17 Posts
            clutchmarketing Reply #5, 12 years ago
            Hi, I tried including
            SecFilterEngine Off
            in my htaccess file, but it give me an internal server error.

            I tried using it as
            <IfModule mod_security.c>
            SecFilterEngine Off
            </IfModule>

            which didn't create a server error, but did not resolve the issue either. Any suggestions?
              • 6038
              • 228 Posts
              christianhanvey Reply #6, 12 years ago
              Your server environment is most likely set up not to allow you to mess with mod_security, or it could be an issue at another level - you should speak to your hosting support people. If they are any good, they should help.