We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3073
    • 28 Posts
    In Revo 2.3.2 I am having problems saving chunks with certain code in. I can save a blank chunk, then add normal code or a comment into it and save it without a problem.

    But as soon as I add in any code with a <script> line in it (basically I'm creating a chunk for my javascript calls) and hit Save, the manager screws up - I've attached a couple of screenshots.

    The page seems to lose some styles and the mini chunk window is unresponsive. If I hit Close then I end up at my sites 'page not found' page, at the address http://www.[mysite].com/?

    BTW, I had this before with a template, when I tried to include a <style>xxx</style> call in it. As soon as I stripped it out and moved it into my css file the problem stopped.

    Any ideas much appreciated.

    ---------------------------
    Revo 2.3.2 on Linux server
    MySQL 5.6.21
    PHP 5.4.36 [ed. note: benco last edited this post 9 years, 3 months ago.]
      • 3073
      • 28 Posts
      Further to this, the problem is now happening with templates. I can add this line
      <script src="js/jquery-1.10.2.min.js"></script>

      into some templates without a problem, but when I add it to other templates the same problem happens. It seems somewhat random.

      I should point out I have cleared cache inside Modx, and also tried working in three different browsers in which I have also cleared the cache, but to no avail.

      Also, no errors showing up in error log. Not in last few days anyway.
      • Sounds like server mod_security issues.

        Apparently a lot of hosting providers have been updating their security configuration lately, causing a lot of similar problems for people.

        What these security settings do is intercept and examine any POST values, like those from the MODX Manager's forms. If it finds something it is configured to disallow, it can cause all kinds of odd failure behaviors in MODX, particularly in the MODX Manager since it uses so many AJAX requests and can behave very oddly when one of these fails with some kind of unrecognized mod_security response (or lack of response). Some time ago one user was having problems with trying to post content with words like "casino" and "bet" in it, his site was not a gambling site, he was just making a blog post that happened to discuss such matters. Sometimes anything having to do with email will fail, sometimes javascript stuff will fail.

        You will need to contact your hosting provider and ask them about getting past their server's mod_security settings, at least for your Manager. They can control this by directory, or they can more easily just disable it entirely for your site.

          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
          • 3073
          • 28 Posts
          Fantastic - that did the trick. Contacted my hosts who disabled it for that site (Catalyst2, always very helpful), and all working now.

          Really appreciate the response - there is no way I'd have worked that out, or even knew it existed.
          • That's what we're here for.
              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