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.

Customising the CMS /

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

Weird Blank/Empty Pages Under Page Tree In CMS after Flush


Go to End


2 Posts   1043 Views

Avatar
tfliam

Community Member, 20 Posts

12 October 2011 at 1:09pm

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.

Avatar
martimiz

Forum Moderator, 1391 Posts

18 October 2011 at 11:15pm

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 :-)