Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » 2.1 upgrade -> CMS log-ing = FATAL ERROR

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

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

Page: 1 2
Go to End
Author Topic: 5288 Views
  • mn
    Avatar
    6 Posts

    2.1 upgrade -> CMS log-ing = FATAL ERROR Link to this post

    I recently upgraded to v2.1 on a server running PHP 5.2. The install ran without any errors and all seemed good. I was able to view the updated CMS using a browser that was previously logged in to the Admin/CMS section.

    After logging out when I attempted to log in I received the following error:

    Fatal error: Call to undefined method stdClass::can() in /home/.furbag/username/dev.siteurl.com/sapphire/core/control/ContentController.php on line 89

    I have found the same error when attempting to log in with other browsers.

    Has anyone experienced this error or can anyone offer potential solutions?

    Thanks in advance for your help!

  • Dave_
    Avatar
    4 Posts

    Re: 2.1 upgrade -> CMS log-ing = FATAL ERROR Link to this post

    "Mn" try to drop silverstripe database and then run install.php again.

  • mn
    Avatar
    6 Posts

    Re: 2.1 upgrade -> CMS log-ing = FATAL ERROR Link to this post

    That seems contrary to the idea of "upgrading". I don't want to delete my existing data.

    Everything seems to be working correctly other than being able to log in to the admin tool.

    Has anyone else experienced this problem?

    Basically I upgraded to 2.1 and now I can't log in to the admin tool. When attempting to log in I receive the following error:

    Fatal error: Call to undefined method stdClass::can() in /home/.furbag/username/dev.siteurl.com/sapphire/core/control/ContentController.php on line 89

  • lapisdecor
    Avatar
    3 Posts

    Re: 2.1 upgrade -> CMS log-ing = FATAL ERROR Link to this post

    try doing a mysql dump, backup database, clean install SS and then load saved data on the database

    this is only an idea since I'm not using SS yet

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

    Re: 2.1 upgrade -> CMS log-ing = FATAL ERROR Link to this post

    Sorry to hear you're having troubles...
    Did you clear the cache? ( /tmp/silverstripe-cache/* )
    I'll see if I can get anyone else to shed some light ....

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: 2.1 upgrade -> CMS log-ing = FATAL ERROR Link to this post

    I myself don't know the problem here, but looking at line 89:

    if($this->dataRecord && !$this->dataRecord->can('View'))

    It appears stdClass is appearing, whatever that is, when it should've picked up a SiteTree class (or subclass) instead?

    After doing some digging in the source browser, I found this changeset (related to stdClass):

    http://open.silverstripe.com/changeset/42923

    Not sure if that helps.

    Does this mean anything to anyone reading this?

    Sean

  • Andy
    Avatar
    230 Posts

    Re: 2.1 upgrade -> CMS log-ing = FATAL ERROR Link to this post

    Try changing:

    if($this->dataRecord && !$this->dataRecord->can('View'))

    to

    if($this->dataRecord && method_exists($this->dataRecord, 'can') && !$this->dataRecord->can('View'))

    and see if that fixes it. I'm not sure where stdClass is coming from though..

  • Matt
    Avatar
    Core Development Team
    84 Posts

    Re: 2.1 upgrade -> CMS log-ing = FATAL ERROR Link to this post

    You don't have a homepage (page with URLSegment = 'home' or a page with HomepageForDomain set appropriately) that SilverStripe can find. It's a known problem to do with the new access rights for pages that Marcus did for GSoC.

    edit: That's the most common cause at any rate.

    5288 Views
Page: 1 2
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.