Jump to:

23483 Posts in 18976 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Error accessing Admin Panel

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

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

Page: 1
Go to End
Author Topic: 1116 Views
  • SuperBlues
    Avatar
    Community Member
    25 Posts

    Error accessing Admin Panel Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: Error accessing Admin Panel Link to this post

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

  • SuperBlues
    Avatar
    Community Member
    25 Posts

    Re: Error accessing Admin Panel Link to this post

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

    1116 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.