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


4 Posts   6085 Views

Avatar
StuM

Community Member, 59 Posts

25 May 2010 at 8:56am

Edited: 28/05/2010 9:51am

This error has been plaging me since around 2.3.3 whenever I create pages with custom content, various sites on various servers. Is there a way to see what the errors are?

In todays case, I've created a custom HomePage class with a couple of extra content sections, and it won't save. One of the attempts it told me to log out and try again, so I did and still no saving.

If I convert the new sections from HtmlEditorField to TextareaField it saves again, but I don't want TextareaFields, so it's probably something wrong with that.

I'm using 2.4.0

Avatar
swaiba

Forum Moderator, 1899 Posts

25 May 2010 at 11:19pm

usual suspects are...

(added in _config.php)

ini_set('display_errors', 1);
error_reporting(E_ALL);

Director::set_environment_type("dev");
Debug::log_errors_to('err.log');

dev/build?flush=1

Also in firefox you can 'Ctrl + Shift + J' to see the error console.

Mainly I solve errors like these by backing tracking slowly. Including going back in time with the db - the sitetree* tables. Often things like not have the happened when an svn update has removed the page type I have configured, my page (extension of data object) has some fields which are not not configured correctly (in the way the cms is trying to display e.g. summary_fields, custom tabs entire) because when you save ss re-scaffolds the fields based on changed data)

hope some of that helps

Avatar
Willr

Forum Moderator, 5523 Posts

25 May 2010 at 11:25pm

Is there a way to see what the errors are?

swaiba listed it very well!. I use firebug's console panel to view the full response which lists the actual error message. The reason we don't display full error logs to the user is thats far to overwhelming (errors could be MASSIVE!) but the error should be in your console. Most of the time with error saving messages your missing database columns.

Avatar
StuM

Community Member, 59 Posts

26 May 2010 at 8:14am

Edited: 26/05/2010 8:16am

Thanks guys. It was a silly error with this 2.4.0 site, I defined the fields as HtmlText instead of HTMLText, but the TextareaField could still save into it, I didn't even check that as I'm testing the site on Windows and didn't think case sensitivity issues like that showed up. I had a 2.3.3 site I run doing the same thing last night, but that only happens randomly and can only be resolved by restarting FF, but I'll just upgrade it or something rather than bothering people here with the details.