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.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

v2.3.0-rc1 Install Good - Content Error


Go to End


8 Posts   2264 Views

Avatar
gadams999

Community Member, 4 Posts

19 November 2008 at 9:17am

Hi,

I've installed 2.3.0-rc1 (fresh install, CentOS 5) and it went fine. But when I log in with the admin account and go to view/modify content, I'm getting the following error in the right pane:

Fatal error: Argument 1 passed to DataObjectDecorator::updateCMSActions() must be an object of class FieldSet, called in /www/cms/sapphire/core/Object.php on line 475 and defined in /www/cms/sapphire/core/model/DataObjectDecorator.php on line 166

A 2.2.3 install works fine. Just wonder if this problem has been seen before.

Avatar
Fuzz10

Community Member, 791 Posts

19 November 2008 at 10:32pm

Same problem here , only on live server though , not on our development server.

What PHP version are you running ?

Avatar
gadams999

Community Member, 4 Posts

20 November 2008 at 2:04am

PHP 5.1.6, specifically the following RPMs:

php-common-5.1.6-20.el5_2.1
php-pdo-5.1.6-20.el5_2.1
php-mysql-5.1.6-20.el5_2.1
php-cli-5.1.6-20.el5_2.1
php-gd-5.1.6-20.el5_2.1
php-5.1.6-20.el5_2.1

My dev settings are set for localhost and 127.0.0.1, but as I've configured host headers for my sites on this box, I normally don't touch those settings. When I added my host header to the _config.php file, no change. I still get the error when attempting to view content.

Hope this is helpful....

Avatar
Fuzz10

Community Member, 791 Posts

20 November 2008 at 2:16am

ahaa....

Having the same problem with the same PHP version. I'll move the site to a different server later today (which contains php 5.2.x) , I'll let you know what the results are.

Avatar
jim.muir

Community Member, 1 Post

25 November 2008 at 10:48am

Edited: 25/11/2008 10:49am

Hi,

I had the same problem :
worked fine on server1 with php 5.2.5
didn't work on server2 with php 5.1.6

I was able to get it working by modifying sapphire/core/model/SiteTree.php:

		if($this->canPublish()) {
 			$actions[] = new FormAction('publish', _t('SiteTree.BUTTONSAVEPUBLISH', 'Save and Publish'));
 		}

 		// getCMSActions() can be extended with updateCmsActions() on a decorator
-		$this->extend('updateCMSActions', $actions);
+		$actionsFieldset = new Fieldset();
+		foreach($actions as $action){
+			$actionsFieldset->push($action);
+		}
+		$this->extend('updateCMSActions', $actionsFieldset);
 		
 		return new DataObjectSet($actions);
 	}

Avatar
gadams999

Community Member, 4 Posts

25 November 2008 at 11:08am

Thanks Jim, worked like a champ. I'll post a reference to this forum posting on the Trac ticket I opened

Avatar
Fuzz10

Community Member, 791 Posts

25 November 2008 at 9:12pm

Check , confirmed.

2.3.0 does not play nice with PHP 5.1.6

Avatar
Sean

Forum Moderator, 922 Posts

25 November 2008 at 9:26pm

Hey guys,

Thanks for the changeset Jim, I've applied this to the SiteTree class which was a bug.

Here it is, committed to the 2.3 branch (which will become 2.3 stable eventually):

http://open.silverstripe.com/changeset/66632/modules

Thanks!
Sean