We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10504
    • 2 Posts
    Hi, got the wrong section of the forum last time.

    Here goes.

    I am trying to add the google anayltics code into my template, however MODx will not save, the save bar keeps scrolling over and over.

    When I take out the <script> tags along with the type/javascript it will let me save it ok, so all of the code, except the javascript tags will save.

    Any Ideas, I did have a suggestion that to turn off rich text editor and it would be ok. That didnt work. I am talking with Dataflame now, incase they are blocking <script> on my database.

    Thanks
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Sounds like a mod_security setting to me.
        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
        • 26016
        • 561 Posts
        I have, very rarely, run into problems in Evo where I could not save particular items. I would get security-related errors, and I think it was 403 errors if I recall. In both cases, I tried playing with some mod_security settings such as those that come with the ht.access example file for the manager, to no avail.

        Being tenacious, in one case I analyzed the whole very long page, and was at least able to trace it to one line of text. It was truly odd, because there didn’t seem to be anything like SQL commands, anything script-related like the above, or other suspect stuff that could trip security. We finally ended up re-phrasing one two-word phrase, and that fixed it, so I moved on.

        In the other case, just last week, I found that I could not save a chunk. The content that killed it was very benign, a DIV with some words with commas in it. I finally updated the #$%#$% thing by editing the database itself. The remaining mystery was that the first time I had saved this chunk with this content in it, it did work fine. Re-saving didn’t. Ghosts in the machine.

        I suppose I could have pursued the issue with the hosts to see if security settings further away were screwing it up.
          MODx and Wordpress development
          Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4