Shortly after we upgraded all our clients MODX sites to 2.6.5 we noticed that we weren't able to save chunks if the chunk contained anything more than the most basic of HTML. Scripts, head tags, meta tags, links to stylesheets, etc wouldn't be accepted. Clicking the Save button would result in the saving progress bar appearing for a split second, then it would disappear, and the chunk content wouldn't save.
Moving these scripts and tags into a template worked fine and that's what we've had to do, but obviously it's not ideal having duplicated meta tags, font and stylesheet links at the top of each template.
I thought it was a mod security issue and have inserted the following into our .htaccess file.
SecFilterEngine Off SecFilterScanPOST Off
I've bumped PHP down to 5.4.
I've checked the following two files:
and done the "_-" to "-_" thing
I've set JS and CSS compression to 0, repaired the database, cleared cache, cookies, re-installed, uninstalled all Extras, not using TinyMCE. We've upgraded some of the sites to 2.7.0 and 2.7.1 but still no luck. What else can I try?
Due to the number of our sites that have been affected and the lack of info about this topic in this forum, I'm assuming it's related to our web host and perhaps still a mod_security issue. Can anybody point me in the right direction? What should I be asking our host?
By the way, on some of our sites we weren't able to create new chunks either, and would get an error stating that the chunk name was invalid. I initially thought this was the one and same problem as the above, but it turned out to be a collation issue where our MySQL db was set to latin swedish while MODX was set to UTF8. Changing the collation of the db to UTF8 in PHPMyadmin solved this problem. However the problem of saving chunks with scripts and tags still persists.
Any help would be appreciated!