Jump to:

10978 Posts in 2721 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » Successful installation of Subsites module on SS 2.3.0 (2.3.7 seems feasible)

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1534 Views
  • christian.b
    Community Member
    8 Posts

    Successful installation of Subsites module on SS 2.3.0 (2.3.7 seems feasible) Link to this post

    I wanted to use the Subsites module on a Silverstripe 2.3.0 version. But after some preliminary testing I had to realize, that this was not as easy as the Subsites documentation suggested. With a lot of fiddling -- I tried trunk, different branches and tags from the Subversion repository -- I found out, which revisions from the repository seemed to be compatible:

    At the moment of writing you can check them out from the subversion repository by the following commands:

    Just to name some of my problems:

    1. When I used Subsites' trunk SQL statements could not be executed; similar is mentioned in "Sapphire SQL Syntax error when installing Subsites Module" and "subsites in 2.3.6 breaks everything" or "Subsites Module fail to install"
    2. Other times I could install everything, and it seemed fine. But when I tried to edit a page on a subsite, I could not save it. It just was displaying "Saving..." (which did not disappear) and nothing else happend after that.
    3. Sometimes when I created a new page on the subsite it looked okay, but in reality the page was added to the main site.
    4. SubsitesVirtualPage did not display which pages to choose from, instead the dropdown-box was empty. So were other dropdown-boxes.

    All those problems disappeared once I found the right mix of versions. It seems to be even possible to use it with 2.3.7, at least I was able to update from 2.3.0. I only had to upgrade the genericdataadmin by one revision to 76917.

    You could go probably up to revision 81732, after that Silverstripe 2.4 API is considered in the code. It is probably not a good idea to use Subsites further than revison 89242, because the next revision includes 2.4 API.

    There seems to be a bug with SubsitesVirtualPage you can not name it identical on a different site. If this is still an issue in trunk a Subsites developer might want to extend the test case concerning identical names to test for that special case: I mean testPagesInDifferentSubsitesCanShareURLSegment() in subsites/test/SiteTreeSubsitesTest.php

    I helped myself with a dirty little patch in the relevant while-condition:

    while (
    (class_exists($this->URLSegment) && is_subclass_of($this->URLSegment, 'RequestHandler')) ||
    SiteTree::get_by_url($this->URLSegment, $idFilter) && !($this instanceof SubsitesVirtualPage)) {

    Since I do not really get the depth of that code segment and such change should be done in the Subsites code base -- at least that is my opinion -- this is probably not a good idea, but still: It works for me. I know I should file a bug. Which I willl, when I have confirmed that this is still an issue in the trunk.

    A small request if any module developer happens to pass by: Could you please add to the README or ChangeLog with which concrete version better revision of the other modules and silverstripe you worked. Or make a compability guide/ matrix in your documentation, which I would prefer. That way other people not familiar with your module can get a baseline from where to start experimenting with your code. This might have helped me a lot.

    Last but not least: Thanks for the Subsites module; and Silverstripe in general.


  • mtz
    Community Member
    17 Posts

    Re: Successful installation of Subsites module on SS 2.3.0 (2.3.7 seems feasible) Link to this post

    Hi Christian,

    THANKS for your Doc about your Journey through 'subsites'.

    It helpes me a lot and my Installation now seems to work.


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.