Jump to:

10844 Posts in 2515 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Error installing Subsites [solved]

Discuss all other Modules here.

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

Page: 1 2
Go to End
Author Topic: 2700 Views
  • D-L
    Avatar
    Community Member
    12 Posts

    Re: Error installing Subsites [solved] Link to this post

    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');

    2700 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.