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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Subsites Module fail to install


Go to End


6 Posts   2367 Views

Avatar
ikhwanb

Community Member, 2 Posts

21 March 2010 at 5:10am

Hello. I really need the subsites module to run on my website. I am currently using ss version 2.3.7 on windows. When I run db/build to install the module, I got these errors...

[User Error] Couldn't run query: SELECT `SubsiteDomain`.*, `SubsiteDomain`.ID, if(`SubsiteDomain`.ClassName,`SubsiteDomain`.ClassName,'SubsiteDomain') AS RecordClassName FROM `SubsiteDomain` INNER JOIN "Subsite" ON "Subsite"."ID" = "SubsiteDomain"."SubsiteID" AND "Subsite"."IsPublic"=1 WHERE ('localhost:81' LIKE replace("SubsiteDomain"."Domain",'*','%')) GROUP BY `SubsiteDomain`.ID ORDER BY "IsPrimary" DESC 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 '"Subsite" ON "Subsite"."ID" = "SubsiteDomain"."SubsiteID" AND
GET /cms/silverstripe/db/build?flush=1

Line 401 in C:\wamp\www\cms\silverstripe\sapphire\core\model\MySQLDatabase.php

Anyone got any solutions for this matter? Thank you in advance.

Avatar
dvp

Community Member, 6 Posts

21 March 2010 at 9:23am

Just change double quotes (") to backtricks (`) in sql queries in subsites module code or turn on ANSI SQL mode
mixing (`) and (") in SQL queries produce these error

Avatar
Willr

Forum Moderator, 5523 Posts

21 March 2010 at 11:20am

I believe if you are trying subsites trunk you will need to be running 2.4 rather that 2.3 for full support.

Avatar
ikhwanb

Community Member, 2 Posts

22 March 2010 at 9:52pm

Thanks for the help guys. Anyway, I installed the branch version and it working fine now.

Avatar
timcole

Community Member, 32 Posts

26 March 2010 at 7:50am

I'm having exactly the same problem... can you tell me what steps you took to get it working? Did you change any code - if so, in which files?

Thanks

Avatar
christian.b

Community Member, 8 Posts

27 March 2010 at 8:07am