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