Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » v2.3.0-rc1 Install Good - Content Error

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

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

Page: 1
Go to End
Author Topic: 1561 Views
  • gadams999
    Avatar
    Community Member
    4 Posts

    v2.3.0-rc1 Install Good - Content Error Link to this post

    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.

  • Fuzz10
    Avatar
    Community Member
    786 Posts

    Re: v2.3.0-rc1 Install Good - Content Error Link to this post

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

    What PHP version are you running ?

  • gadams999
    Avatar
    Community Member
    4 Posts

    Re: v2.3.0-rc1 Install Good - Content Error Link to this post

    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....

  • Fuzz10
    Avatar
    Community Member
    786 Posts

    Re: v2.3.0-rc1 Install Good - Content Error Link to this post

    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.

  • jim.muir
    Avatar
    Community Member
    1 Post

    Re: v2.3.0-rc1 Install Good - Content Error Link to this post

    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);
       }

  • gadams999
    Avatar
    Community Member
    4 Posts

    Re: v2.3.0-rc1 Install Good - Content Error Link to this post

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

  • Fuzz10
    Avatar
    Community Member
    786 Posts

    Re: v2.3.0-rc1 Install Good - Content Error Link to this post

    Check , confirmed.

    2.3.0 does not play nice with PHP 5.1.6

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: v2.3.0-rc1 Install Good - Content Error Link to this post

    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

    1561 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.