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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

getsubtree error


Go to End


12 Posts   1311 Views

Avatar
LU5T

Community Member, 7 Posts

24 March 2015 at 11:08pm

Hi,

We are hosting and supporting a silverstribe website for one of our clients.

The website is running SilverStripe CMS - 2.4.3.
The problem we have is when logging in to the admin backend.
Once logged in, when you change the selection from the tree on the left nothing changes on the right. I have looked at the requests using firebug and it does in fact post to a different ID each time, but returns the same results, hence it looks like nothing is changing.

On another note, when expanding some of the items on the left, it opens up an entire root site tree.
For instance - Root (Entire site tree) -> Gallery -> Root (Entire site tree) -> Gallery etc etc (Screenshot attached)

Please assist asap.
No content changes can be made at all at this moment as it doesnt want to refresh and shows trees on wrong places.

Regards

Attached Files
Avatar
Pyromanik

Community Member, 419 Posts

25 March 2015 at 10:53am

Sounds like an issue with routing. I'd check that first.
mysite/_config.php probably.

Avatar
LU5T

Community Member, 7 Posts

28 March 2015 at 12:05am

Hi,

Thanks for the reply.

Please explain what you mean with "the routing" and what I need to check in _config.php?

Thanks

Avatar
wmk

Community Member, 87 Posts

28 March 2015 at 2:21am

Hi Lu5t,

2.4.3 is a really outdated (and yet unsupported) version. What php version do you use? Did it work before?

Did you check the error logs? Webserver error logs or Silverstripe error logs?
Did you switch to dev mode to get some errors displayed?
Is suhosin enabled and getting into the way? Suhosin errors are a bit harder to find cause it logs to syslog...

Can you check the response in firebug's network tab?

Please provide more information about the error.

Cheers,
wmk

Avatar
LU5T

Community Member, 7 Posts

2 April 2015 at 9:44pm

Hi,

PHP Version 5.2.17,

I have added the below to my _config.php but those files does not exist (added this to config about a week ago)
/ log errors and warnings
SS_Log::add_writer(new SS_LogFileWriter('../silverstripe-errors-warnings.log'), SS_Log::WARN, '<=');

// or just errors
SS_Log::add_writer(new SS_LogFileWriter('../silverstripe-errors.log'), SS_Log::ERR);

// or notices (e.g. for Deprecation Notifications)
SS_Log::add_writer(new SS_LogFileWriter('../silverstripe-errors-notices.log'), SS_Log::NOTICE);

I have also added the below but saw no change anywhere:
Director::set_environment_type("dev");

How do I know if suhosin is enabled?

Firebug shows:
POST http://www.blairatholl.co.za/admin/getsubtree?ajax=1&ID=35
With response:

<li id="record-0" class="Root nodelete"><a href="admin/show/root"><strong>Blair Atholl</strong></a><ul>
<li id="record-2" class="Page closed"><a href="admin/show/2" class="Page closed" title="Page type: Page" >About</a>
<ul>
<li id="record-7" class="Page BrokenLink closed"><a href="admin/show/7" class="Page BrokenLink closed" title="Page type: Page" >Heritage</a>
</li>
<li id="record-8" class="Page closed"><a href="admin/show/8" class="Page closed" title="Page type: Page" >Quick Facts</a>
</li>
<li id="record-9" class="Page closed"><a href="admin/show/9" class="Page closed" title="Page type: Page" >Lifestyle</a>
</li>
<li id="record-11" class="Page closed"><a href="admin/show/11" class="Page closed" title="Page type: Page" >Facilities</a>
</li>
<li id="record-12" class="Page closed"><a href="admin/show/12" class="Page closed" title="Page type: Page" >Masterplan</a>
</li>
<li id="record-13" class="Page closed"><a href="admin/show/13" class="Page closed" title="Page type: Page" >Management Team</a>
</li>
<li id="record-14" class="Page closed"><a href="admin/show/14" class="Page closed" title="Page type: Page" >Developer</a>
</li>
<li id="record-10" class="Contact closed"><a href="admin/show/10" class="Contact closed" title="Page type: Contact" >Location</a>
</li>
<li id="record-58" class="Page closed"><a href="admin/show/58" class="Page closed" title="Page type: Page" >Access</a>
</li>
<li id="record-131" class="Page closed"><a href="admin/show/131" class="Page closed" title="Page type: Page" ><ins title="Added to draft site">Masterplan</ins></a>
</li>
</ul>
</li>
<li id="record-3" class="Contact closed"><a href="admin/show/3" class="Contact closed" title="Page type: Contact" ><span title="Modified on draft site" class="modified">Contact Us</span></a>
</li>
<li id="record-6" class="EnquiryPage notinmenu closed"><a href="admin/show/6" class="EnquiryPage notinmenu closed" title="Page type: EnquiryPage" >Enquiry</a>
</li>
<li id="record-23" class="Page closed"><a href="admin/show/23" class="Page closed" title="Page type: Page" >Equestrian</a>
<ul>
<li id="record-24" class="Page closed"><a href="admin/show/24" class="Page closed" title="Page type: Page" >Facilities</a>
</li>
<li id="record-25" class="Page closed"><a href="admin/show/25" class="Page closed" title="Page type: Page" >Horse Pro</a>
</li>
</ul>
</li>
<li id="record-141" class="Page unexpanded closed"><a href="admin/show/141" class="Page unexpanded closed" title="Page type: Page" >Events</a>
</li>
<li id="record-35" class="GalleryHolder unexpanded closed"><a href="admin/show/35" class="GalleryHolder unexpanded closed" title="Page type: GalleryHolder" ><span title="Modified on draft site" class="modified">Gallery</span></a>
</li>
<li id="record-19" class="Page unexpanded closed"><a href="admin/show/19" class="Page unexpanded closed" title="Page type: Page" ><span title="Modified on draft site" class="modified">Golf Course</span></a>
</li>
<li id="record-1" class="Page closed"><a href="admin/show/1" class="Page closed" title="Page type: Page" >Home</a>
</li>
<li id="record-116" class="Page notinmenu closed"><a href="admin/show/116" class="Page notinmenu closed" title="Page type: Page" ><ins title="Added to draft site">Home</ins></a>
</li>
<li id="record-45" class="Page notinmenu unexpanded closed"><a href="admin/show/45" class="Page notinmenu unexpanded closed" title="Page type: Page" >Member</a>
</li>
<li id="record-27" class="NewsHolder unexpanded closed"><a href="admin/show/27" class="NewsHolder unexpanded closed" title="Page type: NewsHolder" ><span title="Modified on draft site" class="modified">News</span></a>
</li>
<li id="record-4" class="ErrorPage notinmenu closed"><a href="admin/show/4" class="ErrorPage notinmenu closed" title="Page type: ErrorPage" >Page not found</a>
</li>
<li id="record-53" class="Page notinmenu closed"><a href="admin/show/53" class="Page notinmenu closed" title="Page type: Page" >Privacy Policy</a>
</li>
<li id="record-15" class="Page BrokenLink unexpanded closed"><a href="admin/show/15" class="Page BrokenLink unexpanded closed" title="Page type: Page" ><span title="Modified on draft site" class="modified">Property</span></a>
</li>
<li id="record-5" class="ErrorPage notinmenu closed"><a href="admin/show/5" class="ErrorPage notinmenu closed" title="Page type: ErrorPage" >Server error</a>
</li>
<li id="record-52" class="Page notinmenu closed"><a href="admin/show/52" class="Page notinmenu closed" title="Page type: Page" >Terms &amp; Conditions</a>
</li>
<li id="record-26" class="WellnessCentre closed"><a href="admin/show/26" class="WellnessCentre closed" title="Page type: WellnessCentre" >Wellness</a>
</li>
</ul>
</li>

It will then show a different getsubtree id but returns the same result for other menu items:
POST http://www.blairatholl.co.za/admin/getsubtree?ajax=1&ID=19

There is absolutely no errors anywhere, that I can find. It seems it is working perfectly, but returning the wrong tree. Meaning it always returns the root tree.

Would anything change in an upgrade? We do not want to spend hours and hours trying to get the site back to what it was due to an upgrade which has happened many times before with CMS systems.

Please let me know if you need more information.

Thanks

Avatar
Pyromanik

Community Member, 419 Posts

2 April 2015 at 9:57pm

How do I know if suhosin is enabled?
phpinfo(); and/or server signature. Perhaps mods enabled. Something like that.

Avatar
LU5T

Community Member, 7 Posts

2 April 2015 at 10:32pm

Edited: 03/04/2015 1:44am

{Link removed, not applicable to post}

Not sure what to check there, but it doesnt look like it is enabled.

Avatar
Pyromanik

Community Member, 419 Posts

2 April 2015 at 11:19pm

Certainly not, it's running on IIS.
This issue is becoming more likely a server config problem. Although I cannot say for sure.
It's almost like the GET params are being dropped off by the redirect or something.

You could add a strategic var_dump($_GET) to get some info on whether or not that is the case.

eg. maybe in mysite/_config.php add die(var_dump($_GET));

Go to Top