Jump to:

10979 Posts in 2722 Topics by 1815 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: 2841 Views
  • zenmonkey
    Avatar
    Community Member
    528 Posts

    Error installing Subsites [solved] Link to this post

    I'm getting the following error installing Subsites

    Notice: DataObjectDecorator::extraDBFields() is deprecated. Please use extraStatics() instead. in /Applications/MAMP/htdocs/avelli/sapphire/core/model/DataObjectDecorator.php on line 60

    Fatal error: Using $this when not in object context in /Applications/MAMP/htdocs/avelli/subsites/code/SiteTreeSubsites.php on line 32

    I'm on 2.4.4

    Any Ideas?

  • ender
    Avatar
    Community Member
    7 Posts

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

    I have the same problem.

    Please advice

  • kindlemanwill
    Avatar
    Community Member
    67 Posts

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

    Hi, Has anybody resolved this yet?

    Ive just donwloaded Silverstripe to asses it for a multi site project. Ive downloaded 2.4.5 and installed no problem, downloaded the subsites module into the route and i got this error.

    Bit of a show stopper which is a shame.

    Thanks for any help,

    Will

  • honeybunny
    Avatar
    Community Member
    79 Posts

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

    I seem to remember this problem cropping up last year (may have been a different module) but I think the fix was to go into the php file and change the line that says extraDBFields() to extraStatics()

    -------
    Will, I tried the subsite module last year and while it did what it said it would do, it didn't really do what I needed. (I didn't need the sites to share an admin interface, and I wanted some of them on their own database.) I found that using symlinks to run multiple sites with one installation of SS was the best solution for me. I now have six or seven sites running under one installation. Some have their own database, others share one. I haven't had any problems, even when upgrading SS or modules. Just my 2 cents...

    HB

  • zenmonkey
    Avatar
    Community Member
    528 Posts

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

    Yeah I think thats what I did in the end.

    Cheers

  • kindlemanwill
    Avatar
    Community Member
    67 Posts

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

    Hi Thanks for updating this,

    I don't think thats sufficient to solve the problem. The fatal error is from using $this outside obect scope. I tried replacing the old function name throughout the module but it didn't fix the fatal error.

    Any other sugestions / patches to get the latest version working with this module?

    We definetly want to run off the same DB. Our requirement is for a central login to be able to provide content that filters down to the subsites - some news, pages etc . And for each subsite to be able to have their own content.

    Thanks

    Will

  • D-L
    Avatar
    Community Member
    13 Posts

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

    I had the same problems described above with SS2.4.5 and the subsites module. Here's what I did to solve the problem:
    1st) Download the latest revision of the module. At the time of writing, for me, this was:
    Build Date: 2011-03-02
    Download: silverstripe-subsites-master-HEAD.tar.gz
    2nd) Create a folder called subsites and unpack the contents of the file above into it.
    3rd) I ran a /dev/build/?flush=1 , but I got a load of errors, including some of those reported above. I came across several posts including one where someone was advising that we should comment-out certain lines within the subsites/_config.php, but that really didn't seem right to me. So what I did was to simply remove the contents of the subsites/_config.php file and place it into the main _config.php file in the mysites folder. Then I ran the dev/build/?flush=1 and that fixed it for me!

    Hope this helps someone.

  • Antti
    Avatar
    Community Member
    6 Posts

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

    Intresting that this is marked as solved. I have tryed D-L's solutions... dosnt work for me. tryed renaming function but still get $this error...

    I love silverstripe but when it comes to modules they always seem to have some issues. I know this is done for version 2.2 or something but my brain hurts if i must learn every version of SS if i wanna use different modules

    D-L where in _config.php did you those susites/_config.php lines?

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