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

Error installing Subsites [solved]


Go to End


9 Posts   3814 Views

Avatar
DL

Community Member, 13 Posts

13 April 2011 at 9:10pm

Edited: 13/04/2011 9:11pm

Hey Dude,

Sorry you're having so much trouble. I have to confess, what I did really didn't make too much sense to me because in this MVC framework, the lines that were in the subsites/_config.php file should have been picked up and ought to have worked without moving them. However, for some unknown reason, moving those lines out of the subsites/_config.php file and into the main mysite/_config.php file seemed to do the trick for me. The exact lines I moved are as below (and I put them at the end of the _config.php in the mysite folder (mysite/_config.php):

Object::add_extension('SiteTree', 'SiteTreeSubsites');
// Hack - this ensures that the SiteTree defineMethods gets called before any of its subclasses...
new SiteTree();
Object::add_extension('ContentController', 'ControllerSubsites');
Object::add_extension('LeftAndMain', 'LeftAndMainSubsites');
Object::add_extension('LeftAndMain', 'ControllerSubsites');

Object::add_extension('Group', 'GroupSubsites');
Object::add_extension('File', 'FileSubsites');
Object::add_extension('ErrorPage', 'ErrorPageSubsite');
if (class_exists('SiteConfig')) Object::add_extension('SiteConfig', 'SiteConfigSubsites');

Go to Top