Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Subsites Module

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 3283 Views
  • cideas
    Avatar
    Community Member
    6 Posts

    Subsites Module Link to this post

    Hi all, I was wondering if anyone is familiar with the subsites module located here "http://svn.silverstripe.com/open/modules/subsites/trunk/". I have checked out the code and rebuilded the database. So I got to the cms and open up the Subsites tab, after I insert the name and subdomain and press add I'm giving this error "FATAL ERROR: DataObject::get_by_id passed a non-numeric ID #". I assume that the db build didn't take correctly? I did see new fields being created such as SubSiteID and some others(in green).

    If anyone has any information on what is causing this and how to fix this it would be greatly appreciated. Thanks

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Subsites Module Link to this post

    we need a stack-trace (the complete output shown in your error-message) to give any useful help - i suggest using pastie.caboo.se instead of pasting the full output here into the forum.

  • cideas
    Avatar
    Community Member
    6 Posts

    Re: Subsites Module Link to this post

    Here is the output : http://pastie.caboo.se/158297

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Subsites Module Link to this post

    The subsites module is alpha code - which means it has issues like this. It's in production use on a website, but the whole process for installation / configuration is still pretty ropey.

    You will need to manually create a Subsite_Template record in the database.

    We're going to be improving the subsites module for public consumption over the next couple of months.

  • cideas
    Avatar
    Community Member
    6 Posts

    Re: Subsites Module Link to this post

    I see, thought it was at least in beta. I was going to use SS for my internship work,already feel in love with how easy it is to extend and customize, so if its possible to have a quick revision for this that would be great, if not I'll give it a go and add that record. Thanks for your time and information.

  • Racc
    Avatar
    Community Member
    4 Posts

    Re: Subsites Module Link to this post

    Sam, you say we need to create a Subsite_Template record in the db - how many and what fields do we create ??

    i am getting a similar problem with a similar trace...

  • carnal
    Avatar
    Community Member
    19 Posts

    Re: Subsites Module Link to this post

    Hi Racc,

    i am also fighting with the "alpha"-code of the subsites module

    I had to comment the following statements from _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');
    Director::addRules(100, array(
       'admin/subsites/$Action/$ID/$OtherID' => 'SubsiteAdmin',
    ));
    Object::addStaticVars( 'LeftAndMain', array( 'extra_menu_items' => array(
    'Sub-sites' => array("intranets", "admin/subsites/", 'SubsiteAdmin')
    )));

    Don't know what functioniality i have disabled, but got the "add subsite" working.

    Carnalito

  • Racc
    Avatar
    Community Member
    4 Posts

    Re: Subsites Module Link to this post

    I just got it working before too...

    well, kind of...

    I had to create a new row in the Subsites table:
    ID - blank
    ClassName - Subsite_Template
    Created - NOW
    Last edited - NOW
    Subdomain - <new sub domain>
    Title - etc.
    domain - mysite.com

    now i dont really know what to do with it...
    i can't set themes for the subsites, which could be a bit of a problem

    3283 Views
Page: 1
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.