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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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

Error saving content

Go to End

7 Posts   1680 Views


Community Member, 4 Posts

28 February 2011 at 11:59pm

I have the following class:

class Prodotti extends SlideshowProPage {
static $db = array(
"Prodotto" => "Text",
"Tipologia" => "Text",
"Specifiche" => "Text",
"Caratteristiche" => "HTMLText",
"Applicazioni" => "HTMLText"
static $has_one = array(
"SchedaTecnica" => "File",
"InfoProdotto" => "File"
static $has_many = array(

public function getCMSFields($cms) {
$fields = parent::getCMSFields($cms);
$fields->addFieldToTab("Root.Content.Main", new TextField("Prodotto", "Prodotto"), "Content");
$fields->addFieldToTab("Root.Content.Main", new TextField("Tipologia", "Tipologia"), "Content");
$fields->addFieldToTab("Root.Content.Main", new TextField("Specifiche", "Specifiche"), "Content");
$fields->addFieldToTab("Root.Content.Main", new HTMLEditorField("Caratteristiche", "Caratteristiche"), "Content");
$fields->addFieldToTab("Root.Content.Main", new HTMLEditorField("Applicazioni", "Applicazioni"), "Content");
$fields->addFieldToTab('Root.Content.Main', new FileIFrameField("SchedaTecnica"), "Content");
$fields->addFieldToTab('Root.Content.Main', new FileIFrameField("InfoProdotto"), "Content");
return $fields;

What happens is that when I click on Save all ok, but when I click on "save and publishing" generates "error saving content".
Does anyone know give me an explanation ?


Forum Moderator, 435 Posts

1 March 2011 at 1:27am

View with debug. <link>?debug=1


Forum Moderator, 1899 Posts

1 March 2011 at 1:29am

Could be many things... Ctrl+Shit+J in chrome/firefox for the console that reports error in more detail...


Community Member, 4 Posts

1 March 2011 at 2:35am

I used <link>?debug = 1, but now I get the error "javascript parse error". Only that I have not done changes to javascript


Forum Moderator, 1899 Posts

1 March 2011 at 3:31am

and without the ?debug, but lokoing at the javascript errors in the console? I'd image it is some SQL error (they usual are for me saving content) and are often solved with a deb/build


Community Member, 4 Posts

1 March 2011 at 8:51pm

It is very strange because I have two pages of this class and a against these problems and the other no


Forum Moderator, 5523 Posts

2 March 2011 at 11:06pm

Firebug is a good tool for these errors. Ensure your site is running in devmode then try again with Firebugs Console window open, you should see the ajax request and the returned error message.