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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

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

Successful installation of Subsites module on SS 2.3.0 (2.3.7 seems feasible)

Go to End

2 Posts   2078 Views


Community Member, 8 Posts

27 March 2010 at 8:02am

Edited: 27/03/2010 8:03am

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:

svn co silverstripe 
svn co genericdataadmin
svn co -r89242 subsites

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.

svn co -r76917 genericdataadmin

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.



Community Member, 17 Posts

13 April 2010 at 2:01am

Hi Christian,

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

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