Hi,
With both the tar'd 0.1 and trunk versions of the Subsites module on Silverstripe 2.3.6 I get an SQL syntax error when I try to rebuild the database. The following is one of the errors from db/build?flush=1 (and any subsequent access to the silverstripe site):
[User Error] Couldn't run query: SELECT `SiteTree`.*, `GhostPage`.*, `ErrorPage`.*, `RedirectorPage`.*, `VirtualPage`.*, `SubsitesVirtualPage`.*, `SiteTree`.ID, if(`SiteTree`.ClassName,`SiteTree`.ClassName,'SiteTree') AS RecordClassName FROM `SiteTree` LEFT JOIN `GhostPage` ON `GhostPage`.ID = `SiteTree`.ID LEFT JOIN `ErrorPage` ON `ErrorPage`.ID = `SiteTree`.ID LEFT JOIN `RedirectorPage` ON `RedirectorPage`.ID = `SiteTree`.ID LEFT JOIN `VirtualPage` ON `VirtualPage`.ID = `SiteTree`.ID LEFT JOIN `SubsitesVirtualPage` ON `SubsitesVirtualPage`.ID = `SiteTree`.ID WHERE (HomepageForDomain REGEXP '(, ^) *localhost *(,|$)') AND ("SiteTree"."SubsiteID" IN (0)) ORDER BY Sort LIMIT 1 | You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '."SubsiteID" IN (0)) ORDER BY Sort LIMIT 1' at line 1
GET /bean/
Line 401 in /home/adam/public_html/bean/sapphire/core/model/MySQLDatabase.php
If I execute the query manually and remove the quotes from around "SiteTree"."SubsiteID" (i.e. make it simply SiteTree.SubsiteID) it executes without an error. Unfortunately I'm not familiar enough with Sapphire to take this any further.
Am I missing something obvious?