Jump to:

23360 Posts in 18124 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Think they'll accept a patch for this?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 941 Views
  • brianmwaters
    Avatar
    Community Member
    5 Posts

    Think they'll accept a patch for this? Link to this post

    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?

    Thanks!

    - Brian Waters

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: Think they'll accept a patch for this? Link to this post

    Hi Brian,

    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.

    Barry

  • brianmwaters
    Avatar
    Community Member
    5 Posts

    Re: Think they'll accept a patch for this? Link to this post

    Thanks!!!

    I think I'll copy this over almost verbatim now...

    - BW

  • Willr
    Avatar
    Forum Moderator
    5483 Posts

    Re: Think they'll accept a patch for this? Link to this post

    Hi Brian,

    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.

    http://doc.silverstripe.org/sapphire/en/misc/contributing#submiting-patches-bugfixes-and-enhancements

    Cheers,

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