Page 1 of 1

[FIX] Sitemap non-object error

Posted: Tue Apr 19, 2011 4:13 pm
by Martin
This fix resolves the error report
Notice: Trying to get property of non-object in /home/xxx/public_html/xxx/includes/classes/class.sitemap.root.php on line 14
Open: includes/classes/class.sitemap.root.php

Find:

Code: Select all

$html .= '<ul class="' . $options->rootClassName . '">';

Replace with:

Code: Select all

$html .= '<ul class="' . (is_object($options) ? $options->rootClassName : '') . '">';

Re: [FIX] Sitemap non-object error

Posted: Sat May 07, 2011 12:00 pm
by pharexys
This works great, thanks

Re: [FIX] Sitemap non-object error

Posted: Fri Jan 27, 2012 12:12 pm
by catalinux
I still have problems even after doing the specified modification.
I have ISC 6.1.1 Ultimate Edition installed.
When I load "www.website.com/sitemap.php" I get the following error:
Fatal error: Call to a member function getParent() on a non-object in /home2/xxx/public_html/includes/classes/class.sitemap.model.pages.php on line 47

Any ideas?
Thank you.

Re: [FIX] Sitemap non-object error

Posted: Fri Feb 03, 2012 12:55 pm
by Martin
If it doesn't work, you haven't modified the file properly..

My guess is that you have copy of the call on line 47 or something close to it...