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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Error accessing Admin Panel


Go to End


3 Posts   2009 Views

Avatar
SuperBlues

Community Member, 25 Posts

2 October 2010 at 7:12am

Edited: 02/10/2010 8:59pm

Hi Guys,

I have a BIG problem with my site. The site views fine to the outside world but when I go to the admin panel I get and error page presented to me - see below error code:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[User Error] Bad class to singleton() - AccountPage
GET /admin

Line 263 in /homepages/xx/xxx/htdocs/sapphire/core/Core.php
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Source

254 if(($pos = strpos($className,'_')) !== false) $className = substr($className,0,$pos);
255 if($_CLASS_MANIFEST[$className]) return $_CLASS_MANIFEST[$className];
256 }
257
258 function singleton($className) {
259 static $_SINGLETONS;
260 if(!isset($className)) user_error("singleton() Called without a class", E_USER_ERROR);
261 if(!is_string($className)) user_error("singleton() passed bad class_name: " . var_export($className,true), E_USER_ERROR);
262 if(!isset($_SINGLETONS[$className])) {
263 if(!class_exists($className)) user_error("Bad class to singleton() - $className", E_USER_ERROR);
264 $_SINGLETONS[$className] = Object::strong_create($className,null, true);
265 if(!$_SINGLETONS[$className]) user_error("singleton() Unknown class '$className'", E_USER_ERROR);
266 }
267 return $_SINGLETONS[$className];
268 }
269

I am using version 2.3.1

Any ideas?

Thank you

Avatar
Willr

Forum Moderator, 5523 Posts

2 October 2010 at 7:49pm

[User Error] Bad class to singleton() - AccountPage 

It means that the database or the cache is out of date. Its trying to access the AccountPage before its in the cache. Have you added any functionality recently? You might need to do a dev/build?flush=all then reload the admin.

Avatar
SuperBlues

Community Member, 25 Posts

2 October 2010 at 8:58pm

Thanks Will - that fixed it. I removed an e-commerce module and forgot to do the dev/build subsequently.