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:

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

Creating a new page type - admin area not loading

Go to End

3 Posts   1329 Views


Community Member, 1 Post

21 March 2014 at 1:10pm

Edited: 21/03/2014 1:13pm


I am following the tutorial on creating a new page type. I did the steps described in the tutorial:
I created a new file HomePage.php in ROOT/mysite/code and copied this code into it:


class HomePage extends Page {
class HomePage_Controller extends Page_Controller {

Then I rebuilt the database by using (all the links are just to illustrate the paths, they are not real)

When I access the site, it works fine, however, when I go to the admin area, the administration does not load. It seems that the page is frozen - I am on the homepage, then I add "/admin" (or "/admin/pages") to go to the administration, the url is changed to the "/admin/pages", but I still see the homepage and nothing happens and after that I can't access any link on the web (seems to be frozen). And after a while I get an error from the browser - something like the page has broken down...

There are no errors displayed on the site or in the log...

When I delete that HomePage.php file from the server,rebuild the DB via, It works fine again, but naturally without a new page type.

I am new to Silverstripe, so I have no idea how to sort it out, I haven't found anything on the internet on this issue.

Could you please help?




Forum Moderator, 5523 Posts

23 March 2014 at 6:01pm

Make sure your site is in 'devmode' and your PHP is configured with display_errors on so you can see the error message.


Community Member, 1 Post

19 July 2014 at 4:12am

Edited: 19/07/2014 5:06am

I recently started and had the same issue. The problem I found is putting the code snippet at the top of the file rather than the bottom. The tutorial makes it seem that way as it displays the <?php tag right above it. Atleast doing this fixed it for me.

Hello Willr: Which config file should you do that in? I noticed one in the mysite and also the framework directories.

Edit: Actually I did it wrong the second time around, pasting the code to the bottom of pages.php rather than making a new homepage.php. It seems to work though.

Edit Edit: On further tinkering, I assume it's because you closed the php tag at the end?