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.

General Questions

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

error saving page


Reply

4 Posts   694 Views

Avatar
bebabeba

22 August 2011 at 10:32pm Community Member, 192 Posts

Hi!
I install Silverstipe on Aruba Server with linux. Here I have the following problem: when I save a page (for example Page or News Page) I have the following error:

500//There has been an error
console.error(fullMessage);}

If I try to save a second time the error disappear and I can save my page.
With server windows this doesn't happen..
Any idea?

Avatar
swaiba

23 August 2011 at 12:11am Forum Moderator, 1796 Posts

try adding...

SS_Log::add_writer(new SS_LogFileWriter('sserrors.txt', SS_Log::ERR);


to your config and then looking at the file produced in sapphire folder

or search your (apache?) error logs

Avatar
bebabeba

23 August 2011 at 6:47pm (Last edited: 23 August 2011 6:59pm), Community Member, 192 Posts

The message is this:

Error at sapphire/core/model/MySQLDatabase.php line 536: Couldn't run query:
INSERT INTO "SiteTree_versions" ("ShowInMenus", "ShowInSearch", "ProvideComments", "Status", "MenuTitle", "MetaTitle", "MetaKeywords", "MetaDescription", "Priority", "HomepageForDomain", "ToDo", "LastEdited", "ClassName", "Created", "URLSegment", "Title", "Content", "ExtraMeta", "HomePageForDomain", "Sort", "HasBrokenFile", "HasBrokenLink", "ReportClass", "CanViewType", "CanEditType", "Version", "ParentID", "RecordID", "AuthorID") VALUES ('1', '1', '0', 'Saved (new)', null, null, null, null, '0.9', null, null, '2011-08-23 08:43:31', 'Page', '2011-08-23 08:43:25', 'new-page', 'New Page', null, null, null, '6', '0', '0', null, 'Inherit', 'Inherit', 2, '5', 94, 1)

Column 'HomePageForDomain' specified twice (http://mysito/admin/EditForm)

any ideas? I'm on linux so I table start with initial capital letters. For example: SiteTree_Live, SiteConfig but SiteTree_versions

Avatar
martimiz

24 August 2011 at 6:51am Forum Moderator, 1095 Posts

Looks like for some reason the field "HomePageForDomain" is found twice in the CMS form. That shouldn't be the case... Does this happen on a fresh install?