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.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

Help Please - upgraded to 2.4.0 but still can't open admin


Go to End


4 Posts   1897 Views

Avatar
Philwm

Community Member, 22 Posts

9 July 2010 at 1:12pm

This is a continuation of a previous post - I had a lot of help but now I'm still unable to access the cms admin panel, and the client is becoming very dissatisfied.

Here's the error message when I append admin:

[User Error] Bad RecordClassName '' and $baseClass not set
GET /admin

Line 2705 in /usr/local/www/vhosts/robynmathieson.co.nz/httpdocs/sapphire/core/model/DataObject.php

Source

2696 foreach($records as $record) {
2697 if(empty($record['RecordClassName'])) {
2698 $record['RecordClassName'] = $record['ClassName'];
2699 }
2700 if(class_exists($record['RecordClassName'])) {
2701 $results[] = new $record['RecordClassName']($record);
2702 } else {
2703 if(!$baseClass) {
2704 user_error("Bad RecordClassName '{$record['RecordClassName']}' and "
2705 . "\$baseClass not set", E_USER_ERROR);
2706 } else if(!is_string($baseClass) || !class_exists($baseClass)) {
2707 user_error("Bad RecordClassName '{$record['RecordClassName']}' and bad "
2708 . "\$baseClass '$baseClass not set", E_USER_ERROR);
2709 }
2710 $results[] = new $baseClass($record);
2711 }
Trace

Bad RecordClassName '' and $baseClass not set
Line 2705 of DataObject.php
DataObject->buildDataObjectSet(MySQLQuery)
Line 569 of Hierarchy.php
Hierarchy->liveChildren(1,1)
call_user_func_array(Array,Array)
Line 693 of Object.php
Object->__call(liveChildren,Array)
SiteTree->liveChildren(1,1)
Line 438 of Hierarchy.php
Hierarchy->doAllChildrenIncludingDeleted(CMSMain)
Line 416 of Hierarchy.php
Hierarchy->AllChildrenIncludingDeleted(CMSMain)
call_user_func_array(Array,Array)
Line 693 of Object.php
Object->__call(AllChildrenIncludingDeleted,Array)
SiteTree->AllChildrenIncludingDeleted(CMSMain)
Line 159 of Hierarchy.php
Hierarchy->markChildren(SiteTree,CMSMain,AllChildrenIncludingDeleted,numChildren)
Line 94 of Hierarchy.php
Hierarchy->markPartialTree(30,CMSMain,AllChildrenIncludingDeleted,numChildren)
call_user_func_array(Array,Array)
Line 693 of Object.php
Object->__call(markPartialTree,Array)
SiteTree->markPartialTree(30,CMSMain,AllChildrenIncludingDeleted,numChildren)
Line 516 of LeftAndMain.php
LeftAndMain->getSiteTreeFor(SiteTree)
Line 168 of CMSMain.php
CMSMain->SiteTreeAsUL()
Line 369 of ViewableData.php
ViewableData->obj(SiteTreeAsUL,,,1)
Line 445 of ViewableData.php
ViewableData->XML_val(SiteTreeAsUL,,1)
Line 322 of .cache.usr.local.www.vhosts.robynmathieson.co.nz.httpdocs.cms.templates.Includes.CMSMain_left.ss
include(/var/tmp/silverstripe-cache-usr-local-www-vhosts-robynmathieson.co.nz-httpdocs/.cache.usr.local.www.vhosts.robynmathieson.co.nz.httpdocs.cms.templates.Includes.CMSMain_left.ss)
Line 392 of SSViewer.php
SSViewer->process(CMSMain)
Line 342 of ViewableData.php
ViewableData->renderWith(Array)
Line 483 of LeftAndMain.php
LeftAndMain->Left()
Line 369 of ViewableData.php
ViewableData->obj(Left,,,1)
Line 445 of ViewableData.php
ViewableData->XML_val(Left,,1)
Line 59 of .cache.usr.local.www.vhosts.robynmathieson.co.nz.httpdocs.cms.templates.LeftAndMain.ss
include(/var/tmp/silverstripe-cache-usr-local-www-vhosts-robynmathieson.co.nz-httpdocs/.cache.usr.local.www.vhosts.robynmathieson.co.nz.httpdocs.cms.templates.LeftAndMain.ss)
Line 392 of SSViewer.php
SSViewer->process(CMSMain)
Line 202 of Controller.php
Controller->handleAction(SS_HTTPRequest)
Line 134 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
Controller->handleRequest(SS_HTTPRequest)
Line 283 of Director.php
Director::handleRequest(SS_HTTPRequest,Session)
Line 127 of Director.php
Director::direct(/admin)
Line 127 of main.php

I've also found this - http://ssorg.bigbird.silverstripe.com/dataobjectmanager-module-forum/show/282242?start=8

Which isn't too enlightening either.

Avatar
david_nash

Community Member, 55 Posts

15 July 2010 at 12:22pm

I just installed SS2.4 from scratch and got the same error directly after clicking install.

The meta title says "PHP 5 is required" (I'm using PHP5.3).

When I refresh the page to try again I get the same thing.

This is what I see:

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 /var/www/ss24/mysite/_config.php
* Setting up '.htaccess' file...
* Setting up /var/www/ss24/.htaccess
* Building database schema...
[User Error] Bad RecordClassName '' and $baseClass not set
POST /ss24/install.php

Line 2705 in /var/www/ss24/sapphire/core/model/DataObject.php
Source

2696 foreach($records as $record) {
2697 if(empty($record['RecordClassName'])) {
2698 $record['RecordClassName'] = $record['ClassName'];
2699 }
2700 if(class_exists($record['RecordClassName'])) {
2701 $results[] = new $record['RecordClassName']($record);
2702 } else {
2703 if(!$baseClass) {
2704 user_error("Bad RecordClassName '{$record['RecordClassName']}' and "
2705 . "\$baseClass not set", E_USER_ERROR);
2706 } else if(!is_string($baseClass) || !class_exists($baseClass)) {
2707 user_error("Bad RecordClassName '{$record['RecordClassName']}' and bad "
2708 . "\$baseClass '$baseClass not set", E_USER_ERROR);
2709 }

Avatar
david_nash

Community Member, 55 Posts

15 July 2010 at 12:24pm

I just realised it seems to have installed successfully...

Avatar
Philwm

Community Member, 22 Posts

15 July 2010 at 12:31pm

Well - thought it might be solved for me there for a while. Seems to be the same error message but mine was an update to an existing site with existing DBase.

Perhaps it has started to work - I'm off to some flushes and refreshes...

Thanks David