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.

All other Modules /

Discuss all other Modules here.

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

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


Reply


2 Posts   1624 Views

Avatar
christian.b

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:

  • Silverstripe 2.3.0
  • [url=http://doc.silverstripe.org/doku.php?id=modules:genericdataadmin]GenericDataAdmin[/url] 0.2 (r101693)
  • [url=http://doc.silverstripe.org/doku.php?id=modules:subsites]Subsites[/url] 0.1.9999 (r89242)

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

svn co http://svn.silverstripe.com/open/phpinstaller/tags/2.3.0/ silverstripe
svn co http://svn.silverstripe.com/open/modules/genericdataadmin/tags/0.2 genericdataadmin
svn co http://svn.silverstripe.com/open/modules/subsites/trunk -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 [url=http://silverstripe.org/all-other-modules/show/280378?start=0]"Sapphire SQL Syntax error when installing Subsites Module"[/url] and [url=http://www.silverstripe.org/general-questions/show/280699#post280699]"subsites in 2.3.6 breaks everything"[/url] or [url=http://silverstripe.org/all-other-modules/show/281278#post281278]"Subsites Module fail to install"[/url]
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 http://svn.silverstripe.com/open/modules/genericdataadmin/trunk -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:

silverstripe-v2.3.0/sapphire/core/model/SiteTree.php:1002
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.

Christian

Avatar
mtz

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.

Mattes