1053 Posts in 383 Topics by 376 members
| Go to End | Next > | |
| Author | Topic: | 1692 Views |
-
Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help!

8 July 2010 at 11:33pm
You can set an admin user/password in your _config.php to get access to the CMS. There you can reset your admin password and after doing so, delete the line from _config.php..
This is what you would add:Security::setDefaultAdmin('username', 'password');
-
Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help!

9 July 2010 at 12:43am
I'm trying to work through this myself but have reached a dead-end.
After up grading an existing site to 2.4.0 I can't login to the CMS.
So - I've successfully upgraded but still have the original problem!!
I've gone into mysite/-config.php file and checked I'm using the same default admin login. Thanks Banal, I've redone this but still
when I append admin to the URL I end up with a cms-styled page saying (impenetrably unhelpfully):
Website Error
There has been an errorThe website server has not been able to respond to your request.
Please help, this is the second day I've spent trying to access this CMS.
-
Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help!

9 July 2010 at 12:50am
Did you try to append "?isDev=1" to your URL? That should prompt you for username/password and would let you to rebuild the DB.
-
Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help!

9 July 2010 at 12:59am
Thanks Banal, I've just tried it but it just goes straight to the front-end/homepage.
Do you reckon it's something to do with javascript with the change to 2.4.0.?
-
Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help!

9 July 2010 at 1:56am
So you didn't get a login-prompt at all when using isDev? That's strange.
Add:
Director::set_environment_type('dev');
to your _config.php. That should at least give you a more meaningful error output instead of just "There has been an error"
-
Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help!

9 July 2010 at 10:53am
Thanks banal
the config file already has this in it -
Director::set_dev_servers(array(
'localhost',
'127.0.0.1',
));But I figure that's no problem and added suggested code.
Appending admin now gives me a big page of errors:
[User Error] Bad RecordClassName '' and $baseClass not set
GET /adminLine 2705 in /usr/local/www/vhosts/*sitename*.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)etc..... there's half a page of these ...
That's a more fulsome error output but, for me, no more meaningful - although I do comprehend "user error" !
Anyone out there who can interpret this and assist me to get it back on track?
-
Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help!

9 July 2010 at 11:49am
There's a couple of other entries in the forums with $baseClass not set", E_USER_ERROR (I Googled it and found them) Both seem to have happened after upgrading to 2.4.0 and are related to modules. In one instance the poster could have blog, or ecommerce but not both.
I went and deleted the mollom and spamprotection modules completely off the server, and flushed.
But I still get the same result when I append admin.
I'm now assuming that the database still has empty ClassName fields in the File table from when it was built, and that just deleting the files makes no difference.
I don't know how yet, but I'm going to try and inspect the database for empty fields.
Feeling like I'm moving further and further from getting this sorted - any help is greatly appreciated!
-
Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help!

9 July 2010 at 3:40pm
My reading today has resulted in a note from the SS datamodel page ( http://doc.silverstripe.org/datamodel?s=static%2520defaults ):
Generating the database-schema
The Silverstripe database-schema is generated automatically by visiting the URL.
http://<mysite>/dev/build
Note: You need to be logged in as an administrator to perform this command.
If I can't login how is the database being rebuilt? Is this the root of my problem?
| 1692 Views | ||
| Go to Top | Next > |


