Jump to:

4945 Posts in 17688 Topics by 1494 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Creating a new page type - admin area not loading

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

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

Page: 1
Go to End
Author Topic: 387 Views
  • annulixi
    Community Member
    1 Post

    Creating a new page type - admin area not loading Link to this post


    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 http://myweb.com/dev/build (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 http://myweb.com/dev/build, 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?



  • Willr
    Forum Moderator
    5511 Posts

    Re: Creating a new page type - admin area not loading Link to this post

    Make sure your site is in 'devmode' and your PHP is configured with display_errors on so you can see the error message. http://doc.silverstripe.org/framework/en/topics/debugging#dev-mode

  • Heszeth
    Community Member
    1 Post

    Re: Creating a new page type - admin area not loading Link to this post

    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?

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.