Jump to:

10987 Posts in 2724 Topics by 1817 members

All other Modules

SilverStripe Forums » All other Modules » Error: Bad class to singleton() - SiteTree

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 468 Views
  • Marko
    Avatar
    Community Member
    2 Posts

    Error: Bad class to singleton() - SiteTree Link to this post

    Hi, I've recently gotten a couple errors on our prod server (but not on our dev server):

    1.) •   Bad class to singleton() - SiteTree
    Line 275 of Core.php
    •   singleton(SiteTree)
    Line 2461 of DataObject.php
    •   DataObject::get_one(SiteTree,HomepageForDomain REGEXP '(,|^) *[ip address] *(,|$)')
    Line 64 of RootURLController.php
    •   RootURLController::get_homepage_urlsegment()
    Line 41 of RootURLController.php
    •   RootURLController->handleRequest(HTTPRequest)
    Line 277 of Director.php
    •   Director::handleRequest(HTTPRequest,Session)
    Line 121 of Director.php
    •   Director::direct(/)

    2.)•   Bad class to singleton() - SiteTree
    Line 275 of Core.php
    •   singleton(SiteTree)
    Line 37 of ModelAsController.php
    •   ModelAsController->init()
    Line 16 of ModelAsController.php
    •   ModelAsController->handleRequest(HTTPRequest)
    Line 277 of Director.php
    •   Director::handleRequest(HTTPRequest,Session)
    Line 121 of Director.php
    •   Director::direct(*)
    Line 118 of main.php

    I've read that the issue could be:
    •   Multiple classes with the same name
    •   The function is case sensitive and that the case of the class name and the class that's being called in the function might not match.
    •   Need to dev/build
    •   need to flush

    I've tried all to no avail. Any thoughts?

    Thanks,

    Marko

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