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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

SilverStripe 3.0: Unable to add or modify page content


Go to End
Reply


9 Posts   1496 Views

Avatar
arthurdent

Community Member, 184 Posts

10 January 2013 at 5:52pm

Edited: 10/01/2013 5:56pm

After developing a number of sites in versions of SilverStripe 2, I'm experimenting with SilverStripe 3. I've successfully installed SS3 and I'm running the default theme. I can access the CMS, I can change the theme. However I'm unable to add or modify page content. When I attempt to update a page the CMS screen goes grey. The only way to get things moving again is to modify the URL from http://localhost/Worksites/SilverStripe-cms-v3.0.2/index.php/admin/pages/edit/show/1 to http://localhost/Worksites/SilverStripe-cms-v3.0.2/index.php/admin/, at which point I return to the standard admin interface.

The page I have attempted to edit now has a 'note' by it stating that it has been [modified]. However my change has not been writen to the database.

But wait - there's more! I was only modifying an EXISTING default page in the SS install. If I set up a new page and go to publish once again, we go straight to a grey screen in the CMS, and it gains the label [draft]. However, any page content apart from the title is lost.

Anybody else struck this problem? How do I fix it?

Avatar
leepoooo

Community Member, 2 Posts

28 April 2013 at 2:34am

Edited: 28/04/2013 2:34am

I got the same blackHole,
U can add ?> to your PHP files and _config
But anyone know why?

Avatar
arthurdent

Community Member, 184 Posts

30 May 2013 at 3:36pm

Five months down the track and I'm still stuck with this one. I have tried to install on several occasions. Installer always freezes at the following:


Checking that friendly URLs work...
Friendly URLs are not working. This is most likely because a rewrite module isn't configured correctly on your site. You may need to get your web host or server administrator to do this for you:
* mod_rewrite or other rewrite module is enabled on your web server
* AllowOverride All is set for the directory where SilverStripe is installed

I've been through httpd.conf setup on my local development environment to no avail.

Funny thing is, having given the whole exercise up as a a bad job, I can browse to the site and there is a SilverStripe site there. I just can't write to the database. Meaning, of course, that the whole CMS thing becomes somewhat redundant...

Are my problems writing to the database down to my config issues? OR is it down to the fact that SilverStripe didn't complete the install?

Can somebody offer some advise? Urgently? I've got three sites coded and waiting to be implemented in SS!!!

Avatar
arthurdent

Community Member, 184 Posts

30 May 2013 at 3:47pm

Thought I'd post the error trace I get on install...

SilverStripe

Installing SilverStripe...

I am now running through the installation steps (this should take about 30 seconds)

If you receive a fatal error, refresh this page to continue the installation

Setting up 'mysite/_config.php'...
Setting up /Users/arthurdent/Sites/ExperienceRehab-SS-v3.0.5/mysite/_config.php
Setting up '.htaccess' file...
Setting up /Users/arthurdent/Sites/ExperienceRehab-SS-v3.0.5/.htaccess
Building database schema...
Creating default CMS admin account...
Creating initial filesystem assets...
[User Error] Couldn't run query: SELECT DISTINCT "SiteTree_versions"."ClassName", "SiteTree_versions"."Created", "SiteTree_versions"."LastEdited", "SiteTree_versions"."URLSegment", "SiteTree_versions"."Title", "SiteTree_versions"."MenuTitle", "SiteTree_versions"."Content", "SiteTree_versions"."MetaTitle", "SiteTree_versions"."MetaDescription", "SiteTree_versions"."MetaKeywords", "SiteTree_versions"."ExtraMeta", "SiteTree_versions"."ShowInMenus", "SiteTree_versions"."ShowInSearch", "SiteTree_versions"."Sort", "SiteTree_versions"."HasBrokenFile", "SiteTree_versions"."HasBrokenLink", "SiteTree_versions"."ReportClass", "SiteTree_versions"."CanViewType", "SiteTree_versions"."CanEditType", "SiteTree_versions"."Version", "SiteTree_versions"."ParentID", "SiteTree_versions"."RecordID" AS "ID", CASE WHEN "SiteTree_versions"."ClassName" IS NOT NULL THEN "SiteTree_versions"."ClassName" ELSE 'SiteTree' END AS "RecordClassName", "SiteTree_versions"."RecordID", "SiteTree_versions"."WasPublished", "SiteTree_versions"."AuthorID", "SiteTree_versions"."PublisherID" FROM "SiteTree_versions" WHERE ("SiteTree_versions"."RecordID" = 6) AND ("SiteTree_versions"."Version" = 1) ORDER BY "SiteTree_versions"."Version" ASC, "SiteTree_versions"."Sort" ASC LIMIT 1 Out of sort memory, consider increasing server sort buffer size

POST /Worksites/ExperienceRehab-SS-v3.0.5/install.php

Line 580 in /Users/arthurdent/Sites/ExperienceRehab-SS-v3.0.5/framework/model/MySQLDatabase.php

Source

571    }
572
573    public function databaseError($msg, $errorLevel = E_USER_ERROR) {
574       // try to extract and format query
575       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
576          $formatter = new SQLFormatter();
577          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
578       }
579
580       user_error($msg, $errorLevel);
581    }
582
583    /**
584     * Return a boolean type-formatted string
585     *
586     * @param array $values Contains a tokenised list of info about this data type
Trace

Couldn't run query: SELECT DISTINCT "SiteTree_versions"."ClassName", "SiteTree_versions"."Created", "SiteTree_versions"."LastEdited", "SiteTree_versions"."URLSegment", "SiteTree_versions"."Title", "SiteTree_versions"."MenuTitle", "SiteTree_versions"."Content", "SiteTree_versions"."MetaTitle", "SiteTree_versions"."MetaDescription", "SiteTree_versions"."MetaKeywords", "SiteTree_versions"."ExtraMeta", "SiteTree_versions"."ShowInMenus", "SiteTree_versions"."ShowInSearch", "SiteTree_versions"."Sort", "SiteTree_versions"."HasBrokenFile", "SiteTree_versions"."HasBrokenLink", "SiteTree_versions"."ReportClass", "SiteTree_versions"."CanViewType", "SiteTree_versions"."CanEditType", "SiteTree_versions"."Version", "SiteTree_versions"."ParentID", "SiteTree_versions"."RecordID" AS "ID", CASE WHEN "SiteTree_versions"."ClassName" IS NOT NULL THEN "SiteTree_versions"."ClassName" ELSE 'SiteTree' END AS "RecordClassName", "SiteTree_versions"."RecordID", "SiteTree_versions"."WasPublished", "SiteTree_versions"."AuthorID", "SiteTree_versions"."PublisherID" FROM "SiteTree_versions" WHERE ("SiteTree_versions"."RecordID" = 6) AND ("SiteTree_versions"."Version" = 1) ORDER BY "SiteTree_versions"."Version" ASC, "SiteTree_versions"."Sort" ASC LIMIT 1 Out of sort memory, consider increasing server sort buffer size
MySQLDatabase.php:580
MySQLDatabase->databaseError(Couldn't run query: SELECT DISTINCT "SiteTree_versions"."ClassName", "SiteTree_versions"."Created", "SiteTree_versions"."LastEdited", "SiteTree_versions"."URLSegment", "SiteTree_versions"."Title", "SiteTree_versions"."MenuTitle", "SiteTree_versions"."Content", "SiteTree_versions"."MetaTitle", "SiteTree_versions"."MetaDescription", "SiteTree_versions"."MetaKeywords", "SiteTree_versions"."ExtraMeta", "SiteTree_versions"."ShowInMenus", "SiteTree_versions"."ShowInSearch", "SiteTree_versions"."Sort", "SiteTree_versions"."HasBrokenFile", "SiteTree_versions"."HasBrokenLink", "SiteTree_versions"."ReportClass", "SiteTree_versions"."CanViewType", "SiteTree_versions"."CanEditType", "SiteTree_versions"."Version", "SiteTree_versions"."ParentID", "SiteTree_versions"."RecordID" AS "ID", CASE WHEN "SiteTree_versions"."ClassName" IS NOT NULL THEN "SiteTree_versions"."ClassName" ELSE 'SiteTree' END AS "RecordClassName", "SiteTree_versions"."RecordID", "SiteTree_versions"."WasPublished", "SiteTree_versions"."AuthorID", "SiteTree_versions"."PublisherID" FROM "SiteTree_versions" WHERE ("SiteTree_versions"."RecordID" = 6) AND ("SiteTree_versions"."Version" = 1) ORDER BY "SiteTree_versions"."Version" ASC, "SiteTree_versions"."Sort" ASC LIMIT 1 | Out of sort memory, consider increasing server sort buffer size,256)
MySQLDatabase.php:132
MySQLDatabase->query(SELECT DISTINCT "SiteTree_versions"."ClassName", "SiteTree_versions"."Created", "SiteTree_versions"."LastEdited", "SiteTree_versions"."URLSegment", "SiteTree_versions"."Title", "SiteTree_versions"."MenuTitle", "SiteTree_versions"."Content", "SiteTree_versions"."MetaTitle", "SiteTree_versions"."MetaDescription", "SiteTree_versions"."MetaKeywords", "SiteTree_versions"."ExtraMeta", "SiteTree_versions"."ShowInMenus", "SiteTree_versions"."ShowInSearch", "SiteTree_versions"."Sort", "SiteTree_versions"."HasBrokenFile", "SiteTree_versions"."HasBrokenLink", "SiteTree_versions"."ReportClass", "SiteTree_versions"."CanViewType", "SiteTree_versions"."CanEditType", "SiteTree_versions"."Version", "SiteTree_versions"."ParentID", "SiteTree_versions"."RecordID" AS "ID", CASE WHEN "SiteTree_versions"."ClassName" IS NOT NULL THEN "SiteTree_versions"."ClassName" ELSE 'SiteTree' END AS "RecordClassName", "SiteTree_versions"."RecordID", "SiteTree_versions"."WasPublished", "SiteTree_versions"."AuthorID", "SiteTree_versions"."PublisherID" FROM "SiteTree_versions" WHERE ("SiteTree_versions"."RecordID" = 6) AND ("SiteTree_versions"."Version" = 1) ORDER BY "SiteTree_versions"."Version" ASC, "SiteTree_versions"."Sort" ASC LIMIT 1,256)
DB.php:200
DB::query(SELECT DISTINCT "SiteTree_versions"."ClassName", "SiteTree_versions"."Created", "SiteTree_versions"."LastEdited", "SiteTree_versions"."URLSegment", "SiteTree_versions"."Title", "SiteTree_versions"."MenuTitle", "SiteTree_versions"."Content", "SiteTree_versions"."MetaTitle", "SiteTree_versions"."MetaDescription", "SiteTree_versions"."MetaKeywords", "SiteTree_versions"."ExtraMeta", "SiteTree_versions"."ShowInMenus", "SiteTree_versions"."ShowInSearch", "SiteTree_versions"."Sort", "SiteTree_versions"."HasBrokenFile", "SiteTree_versions"."HasBrokenLink", "SiteTree_versions"."ReportClass", "SiteTree_versions"."CanViewType", "SiteTree_versions"."CanEditType", "SiteTree_versions"."Version", "SiteTree_versions"."ParentID", "SiteTree_versions"."RecordID" AS "ID", CASE WHEN "SiteTree_versions"."ClassName" IS NOT NULL THEN "SiteTree_versions"."ClassName" ELSE 'SiteTree' END AS "RecordClassName", "SiteTree_versions"."RecordID", "SiteTree_versions"."WasPublished", "SiteTree_versions"."AuthorID", "SiteTree_versions"."PublisherID" FROM "SiteTree_versions" WHERE ("SiteTree_versions"."RecordID" = 6) AND ("SiteTree_versions"."Version" = 1) ORDER BY "SiteTree_versions"."Version" ASC, "SiteTree_versions"."Sort" ASC LIMIT 1,256)
SQLQuery.php:949
SQLQuery->execute()
DataList.php:716
DataList->first()
Versioned.php:1083
Versioned::get_version(Page,6,1)
SiteTree.php:1457
SiteTree->onAfterWrite()
DataObject.php:1185
DataObject->write()
Versioned.php:574
Versioned->writeWithoutVersion()
call_user_func_array(Array,Array)
Object.php:643
Object->__call(writeWithoutVersion,Array)
Filesystem.php:161
Page->writeWithoutVersion()
Filesystem.php:161
Filesystem::sync()
install.php5:1202
Installer->install(Array)
install.php5:241
include(/Users/arthurdent/Sites/ExperienceRehab-SS-v3.0.5/framework/dev/install/install.php5)
install.php:26
include(/Users/arthurdent/Sites/ExperienceRehab-SS-v3.0.5/framework/dev/install/install.php)
install.php:13
Checking that friendly URLs work...
Friendly URLs are not working. This is most likely because a rewrite module isn't configured correctly on your site. You may need to get your web host or server administrator to do this for you:
* mod_rewrite or other rewrite module is enabled on your web server
* AllowOverride All is set for the directory where SilverStripe is installed

Avatar
kinglozzer

Community Member, 175 Posts

31 May 2013 at 3:55am

The error is in that message you pasted: "Out of sort memory, consider increasing server sort buffer size". There's a similar thread here: http://www.silverstripe.org/data-model-questions/show/14891

"Increasing the sort_buffer_size did it in my case. XAMPP (my dev environment) turns this setting down really low to accommodate low power computers and laptops apparently. Changed it from 64K to 256K."

So, if you're on XAMPP, that could be your solution.

Hope this helps

Avatar
arthurdent

Community Member, 184 Posts

1 June 2013 at 3:10pm

Hi kinglozzer. Thanks for the tip. As it happens XAMPP is my development environment too so I thought we were really onto something here. Unfortunately, after doubling the sort_buffer_size to 256k, then 512k and then 1024k - still getting exactly the same result...

Maybe I should give it up and move to MAMP?

Avatar
arthurdent

Community Member, 184 Posts

9 June 2013 at 2:00pm

Moved to MAMP. Much easier to set up and configure. Sorted!

Avatar
shaf

Community Member, 27 Posts

19 June 2013 at 10:45pm

Edited: 19/06/2013 10:45pm

just read your post could you make a new post please in very basic terms and explain how you Moved to MAMP. Much easier to set up and configure. Sorted! and also were mamp is and what it is thanks arthurdent : )

Go to Top