21281 Posts in 5729 Topics by 2600 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1563 Views |
-
Site is working fine, suddenly I cant access Admin

25 January 2011 at 7:36am
Hi all. I've ran into a major problem.
For some reason now when I visit my admin page. It goes straight to an error:
Server error
Sorry, there was a problem with handling your request.
Everything is fine at the front end.
Is there anything I can do to repair this without loosing the content of my database?
Your help is urgently required. Thanks!
-
Re: Site is working fine, suddenly I cant access Admin

25 January 2011 at 8:05am
add this to the top of your config, debug through log messages to find out what happens...
ini_set('display_errors', 1);
error_reporting(E_ALL);and read (it's also full of debugging advice)...
http://doc.silverstripe.org/sapphire/en/installation/common-problems
-
Re: Site is working fine, suddenly I cant access Admin

25 January 2011 at 8:19am
Thanks swaiba. I get the following when running in dev mode:
[User Error] Bad RecordClassName '' and $baseClass not set
DataObject.php :
2753 foreach($records as $record) {
2754 if(empty($record['RecordClassName'])) {
2755 $record['RecordClassName'] = $record['ClassName'];
2756 }
2757 if(class_exists($record['RecordClassName'])) {
2758 $results[] = new $record['RecordClassName']($record);
2759 } else {
2760 if(!$baseClass) {
2761 user_error("Bad RecordClassName '{$record['RecordClassName']}' and "
2762 . "\$baseClass not set", E_USER_ERROR);
2763 } else if(!is_string($baseClass) || !class_exists($baseClass)) {
2764 user_error("Bad RecordClassName '{$record['RecordClassName']}' and bad "
2765 . "\$baseClass '$baseClass not set", E_USER_ERROR);
2766 }
2767 $results[] = new $baseClass($record);
2768 } -
Re: Site is working fine, suddenly I cant access Admin

25 January 2011 at 8:35am
Fixed it! I had a emply className in one of my entries in the siteTree_Live table.
PHEW! I'm due to go live with this site on Monday and I thought i was buggered there!
-
Re: Site is working fine, suddenly I cant access Admin

8 February 2011 at 2:15am
Thank you MagicUK,
I had an error where i would get bad record classname when i clicked on a folder in Files and Images.
In my files table i had several images with empty column classname, setting that to Image solved the issue. -
Re: Site is working fine, suddenly I cant access Admin

30 January 2012 at 11:00pm
Hello MagikUK,
I have the sam problem, but I don't understand how you solve this. Can you explain how you fixed it?Thanks
-
Re: Site is working fine, suddenly I cant access Admin

31 January 2012 at 1:38am
Hey justbql. I had to go into my phpAdmin on my server control panel and browse my database tables to look for an empty value in the 'className' column of my table. You will need to edit that to something that matches the other classnames. You should be able to work out what it should be from the other values on the row.
-
Re: Site is working fine, suddenly I cant access Admin

31 January 2012 at 3:40am
@justbql
To find problem pages...
SELECT * FROM SiteTree WHERE ClassName='';
SELECT * FROM SiteTree_Live WHERE ClassName='';
SELECT * FROM SiteTree_versions WHERE ClassName='';To fix problem pages...
UPDATE SiteTree SET ClassName = 'Page' WHERE ClassName='';
UPDATE SiteTree_Live SET ClassName = 'Page' WHERE ClassName='';
UPDATE SiteTree_versions SET ClassName = 'Page' WHERE ClassName='';
| 1563 Views | ||
|
Page:
1
|
Go to Top |



