22401 Posts in 6881 Topics by 2748 members
|Go to End|
24 March 2011 at 7:18am Last edited: 24 March 2011 7:25am
I'm still waiting for my membership to the development mailing list to clear, so in the meantime I'll ask this here. It's probably better anyway.
Currently, when you run /dev/build, a bunch of default pages like "Home" and "Page not found" are created. Some add-on modules create default pages too. This is annoying if you don't want those pages, or if you want them to be called something else.
If the user has SiteTree::set_default_pages(false) in their _config.php, the "Home" page doesn't get created, but the others do. This is because SiteTree::requireDefaultRecords() checks to see if SiteTree::$create_default_pages is set, but others can't, since that member is private.
Clearly, if the user calls SiteTree::set_default_pages(false), then they don't want any default pages to be created.
In order to fix this, we have to create a SiteTree::get_default_pages() method, and add checks to a few requireDefaultRecords() methods. Add-on modules should probably add these checks in the future, but they'll break compatibility with old versions of SilverStripe if they do.
This patch will only take about 20 minutes of work, but as there is a potential compatibility break if add-on modules adapt it, I'd like to hear what people's thoughts are before I go through the trouble of submitting it. I guess this will have to go into SilverStripe 2.5. Is that release even in the works, or will the next non-minor release be 3.0? If I do this patch, what branch should I do it against?
- Brian Waters
24 March 2011 at 7:56am
Welcome! while this and the dev list are places to discuss this what you are saying sounds very straightforward. I'd advise you to goto open.silverstirpe.org and raise a ticket and indicate your fix - it's the quickest way to get in contact with the devs and find out what they think of your patch.
24 March 2011 at 8:06am
I think I'll copy this over almost verbatim now...
24 March 2011 at 8:45pm
We're not accepting patches for features in the 2.4 branch any more (that's going to be limited to security releases from now) so you should be working on any new functionality on master - https://github.com/silverstripe/sapphire. Fork that repository and submit your patches as pull requests.
|Go to Top|