Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Weird Blank/Empty Pages Under Page Tree In CMS after Flush

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

Page: 1
Go to End
Author Topic: 437 Views
  • tfliam
    Avatar
    Community Member
    20 Posts

    Weird Blank/Empty Pages Under Page Tree In CMS after Flush Link to this post

    Hi,

    I am very new to Silverstripe and is doing the tutorial 2 on 'Extending a basic site' from this linki
    http://doc.silverstripe.org/sapphire/en/tutorials/2-extending-a-basic-site

    After I added the code below to the ArticlePage.php in mysite\code, then I flush the cache. I view the CMS and now besides the 'Home', 'About Us', 'Contact Us', 'Page Not Found', and 'Server Error' pages, I now also have 11 blank or empty pages under the page trees.

    <?php
    class ArticlePage extends Page {
    // ...

    function getCMSFields() {
    $fields = parent::getCMSFields();

    $fields->addFieldToTab('Root.Content.Main', new DateField('Date'), 'Content');
    $fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');

    return $fields;
    }
    }

    // ...

    Why are these blank pages added? I have attached the print screen... appreciates greatly if anyone can help. Thanks.

    Attached Files
  • martimiz
    Avatar
    Forum Moderator
    1035 Posts

    Re: Weird Blank/Empty Pages Under Page Tree In CMS after Flush Link to this post

    That just shouldn't happen at all. I would just reinstall and start again - but you probably did this already, seing the date above this post

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