Jump to:

23481 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » [SOLVED] Error saving content?

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

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

Page: 1
Go to End
Author Topic: 3186 Views
  • StuM
    Avatar
    Community Member
    56 Posts

    [SOLVED] Error saving content? Link to this post

    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

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: [SOLVED] Error saving content? Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: [SOLVED] Error saving content? Link to this post

    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.

  • StuM
    Avatar
    Community Member
    56 Posts

    Re: [SOLVED] Error saving content? Link to this post

    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.

    3186 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.