We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • discuss.answer
    • 3749
    • 24,544 Posts
    If something on the page violates a mod_security rule, the server won't let it be saved to disk or written to the database. The modx_security rule set on some hosts changes often and quite often the trigger is something it considers a dangerous word, phrase, or bit of code. This would not show up in the MODX Error log because it's not a MODX or PHP error. I don't think it will show up in the server error log either, but I could be wrong.

    One user was unable to save any chunk that contained the word "casino," and rules about bits of PHP, JS, or HTML code (e.g., preg_replace, str_replace, script, base64_decode, etc.) are common.

    The bottom line is to ask your hosting service. They should be able to see it in their logs. If they're not willing to help you, it might be time to change hosts. It's unpleasant, but if the host has restrictive mod_security rules and won't lift them, there are bound to be other problems. If you end up switching, this might be helpful:

    MODX-Friendly 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
      • 14877
      • 110 Posts
      Bob, you nailed it! Fancy Apache parsing what is being written to a mySQL database. I understand security, but that seems a bit too much. I guess they are trying to come to grips with hackers and various kinds of injection attacks.

      Anyway, I've always found my hosting provider to be both responsive and very helpful. In their first reply to my trouble ticket, it was immediately escalated to a techie. The techie requested verification of my credentials (i.e. that I really was the account owner) and disabled the mod_security module rules for me.

      Everything is working fine now smiley

      Thanks to BobRay and claytonk for solving this problem for me. I feel better knowing exactly why it was happening, but annoyed that it occurred in the first place… and I've expanded my knowledge!
        __________________
        JRG
        • 3749
        • 24,544 Posts
        I'm glad you got it sorted. smiley
          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