Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

**SOLVED**Error Saving Content


Go to End


2 Posts   2450 Views

Avatar
ambient

Community Member, 130 Posts

6 June 2012 at 9:06am

Edited: 12/06/2012 11:17pm

Hey all,
Well I'm at my wits end with this one.

On some pages in my site I'm getting the "Error Saving Content" when I click "Save" or "Save and Publish"

Sometimes the problem is the words "from" or "select" appearing in the text. If I remove them it will save okay.

Sometimes the problem is an image I've inserted in the HTML content editor. If I remove the image it will save okay.

I get the errors "NetworkError: 404 Not Found - http://mysite.com/admin/EditForm"

And with the images I get this error "NetworkError: 404 Not Found - http://mysite.com/assets/resampled/resizedimage600423-myimage.jpg"

I have tried reinstalling uploadify and dataobject_manager

I have tried the line UploadifyField::disable_authentication() and that caused a fatal error even though I installed the latest version of uploadify

I have tried installing userforms

I have tried the line SecFilterEngine Off in htaccess but it causes a 500 error - I haven't asked the hosting company to change this for me because it was all working before so I don't think its the problem, does that make sense?

Can anyone please help with this

EDIT:
Okay so I got the hosting company to look at the SecFilterEngine and they fixed it. When I asked what the problem was they said:

"We can't know for sure but it seems what ever CMS or template you were using triggered modsec when you tried to save some text."

I'm not sure if this problem will repeat itself or not. Hopefully not.

Avatar
figj

Community Member, 12 Posts

2 September 2013 at 9:34am

FYI - Using Silverstripe 3, I was having a similar problem - my CMS was returning "Internal Server Error" whenever I try to save any page containing the words "select" and "from".

The root cause was a hosting problem. My provider was using a WAF (www.modsecurity.org) which was blocking the CMS HTTP Post based on the following pattern match:
"(insert[[:space:]]+into.+values|select.*from.+[a-z|AZ|0-9]|select.+from|bulk[[:space:]]+insert|union.+select|convert.+\\\\(.*from)"

The fix was for my hosting provider to whitelist my hostname and the CMS URI "/admin/pages/edit/EditForm".

BTW - A huge thankyou for the above post. This problem has been driving me nuts for ages. (My online documentation has lots of "Please select this item from this menu...".