[FIX] Sitemap non-object error

For articles specific to version 6.x
Post Reply
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

[FIX] Sitemap non-object error

Post 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 : '') . '">';
pharexys
Posts: 4
Joined: Sat Jan 29, 2011 5:20 pm
Location: 168

Re: [FIX] Sitemap non-object error

Post by pharexys »

This works great, thanks
catalinux
Posts: 6
Joined: Fri Jan 27, 2012 12:09 pm
Location: Romania

Re: [FIX] Sitemap non-object error

Post 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.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [FIX] Sitemap non-object error

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