Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » FATAL ERROR: Bad class to singleton() - Page

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: 1332 Views
  • rayventure
    Avatar
    Community Member
    2 Posts

    FATAL ERROR: Bad class to singleton() - Page Link to this post

    I'm quite new to SS and have a fatal error to the site. Any assistance would be appreciated. I'm screwed because it is for an event tonight.

    FATAL ERROR: Bad class to singleton() - Page
    At line 85 in /public_html/sapphire/core/Core.php

    user_error(Bad class to singleton() - Page,256)
    line 85 of Core.php

    singleton(Page)
    line 279 of CMSMain.php

    CMSMain->PageTypes()
    line 1149 of CMSMain.php

    CMSMain->AddPageOptionsForm()
    call_user_func_array(Array,Array)
    line 322 of ViewableData.php

    ViewableData->obj(AddPageOptionsForm)
    line 50 of .cache.home1.davidcas.public_html.cms.templates.Includes.CMSMain_left.ss

    include(/var/tmp/silverstripe-cache-home1-davidcas-public_html/.cache.home1.davidcas.public_html.cms.templates.Includes.CMSMain_left.ss)
    line 197 of SSViewer.php

    SSViewer->process(CMSMain)
    line 763 of ViewableData.php

    ViewableData->renderWith(Array)
    line 365 of LeftAndMain.php

    LeftAndMain->Left()
    call_user_func_array(Array,Array)
    line 404 of ViewableData.php

    ViewableData->XML_val(Left,,1)
    line 89 of .cache.home1.davidcas.public_html.cms.templates.LeftAndMain.ss

    include(/var/tmp/silverstripe-cache-home1-davidcas-public_html/.cache.home1.davidcas.public_html.cms.templates.LeftAndMain.ss)
    line 197 of SSViewer.php

    SSViewer->process(CMSMain)
    line 296 of Controller.php

    Controller->defaultAction(index,Array)
    line 267 of Controller.php

    Controller->run(Array)
    line 104 of Director.php

    Director::direct(admin/)
    line 158 of main.php

    Context

    Debug (Debug::showError() in line 180 of Debug.php)

    className =
    Page
    _SINGLETONS =
    Member =
    Database record: Member

    ID :
    0
    Group =
    Database record: Group

    ID :
    0
    Group_Unsecure =
    Database record: Group_Unsecure

    ID :
    0

  • rayventure
    Avatar
    Community Member
    2 Posts

    Re: FATAL ERROR: Bad class to singleton() - Page Link to this post

    I also recieve this Fatal error: Class 'Page_Controller' not found in /home1/davidcas/public_html/sapphire/core/model/GhostPage.php on line 101 with a database flush.

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: FATAL ERROR: Bad class to singleton() - Page Link to this post

    Looks like Page and Page_Controller aren't found so perhaps you're missing the Page.php file? Should be in mysite/code/

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