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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

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

Error: Bad class to singleton() - SiteTree


Go to End


773 Views

Avatar
Marko

Community Member, 2 Posts

25 October 2011 at 11:42am

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