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.

Archive /

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

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

Subsites Module


Reply


8 Posts   3344 Views

Avatar
cideas

Community Member, 6 Posts

21 February 2008 at 6:01am

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

Avatar
Ingo

Forum Moderator, 801 Posts

24 February 2008 at 6:56pm

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.

Avatar
cideas

Community Member, 6 Posts

28 February 2008 at 6:56am

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

Avatar
Sam

Administrator, 685 Posts

28 February 2008 at 9:27am

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.

Avatar
cideas

Community Member, 6 Posts

28 February 2008 at 11:13pm

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.

Avatar
Racc

Community Member, 4 Posts

24 July 2008 at 1:45am

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...

Avatar
carnal

Community Member, 19 Posts

25 July 2008 at 1:02am

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

Avatar
Racc

Community Member, 4 Posts

25 July 2008 at 1:35am

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