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.

Archive /

Our old forums are still available as a read-only archive.

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

Can't add HomePage.php in Tutorial 1


Go to End


1229 Views

Avatar
biokrome

Community Member, 2 Posts

8 October 2008 at 8:02am

I've seen others with this issue but have not seen a resolution, though I may have missed it.

I've installed WAMP on WinXP and installed SS as per instructions. I started going through Tutorial 1 and all was well (after modifying the URL to remove ':3000') until I got to the part about changing the home page.

I put HomePage.php in \tutorial\code and flushed the db. The page shows this:

FATAL ERROR: Bad class to singleton() - HomePage
At line 85 in C:\wamp\www\silverstripe-empty\sapphire\core\Core.php

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

singleton(HomePage)
line 175 of DatabaseAdmin.php

DatabaseAdmin->doBuild()
line 90 of DatabaseAdmin.php

DatabaseAdmin->build(Array)
line 261 of Controller.php

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

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

followed by some other stuff. Needless to say the new HomePage type was not added to Admin.

So, how exactly do I change the home page?

Thanks