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

2.1 upgrade -> CMS log-ing = FATAL ERROR


Go to End


12 Posts   6692 Views

Avatar
mn

6 Posts

3 October 2007 at 1:28pm

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!

Avatar
Dave_

4 Posts

12 October 2007 at 2:00am

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

Avatar
mn

6 Posts

12 October 2007 at 4:45am

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

Avatar
lapisdecor

3 Posts

24 October 2007 at 9:47am

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

Avatar
Sigurd

Forum Moderator, 628 Posts

24 October 2007 at 8:13pm

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

Avatar
Sean

Forum Moderator, 922 Posts

24 October 2007 at 8:23pm

Edited: 24/10/2007 8:25pm

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

Avatar
Matt

Community Member, 86 Posts

26 October 2007 at 3:47pm

Edited: 26/10/2007 3:48pm

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.

Avatar
mn

6 Posts

2 November 2007 at 11:39am

To which file should I add URLSegment = 'home'?

Thanks in advance for the help. I had put together a pretty solid and customized SS site as a demo then put it away for a while. I saw the upgrade and wanted to give it a run through. Overall it seems to be a really excellent CMS solution.

Go to Top