[Patch] Undefined property: stdClass::$priority and $changef
4 posts
• Page 1 of 1
[Patch] Undefined property: stdClass::$priority and $changef
Hi,
I use Xmap 2.0 with Joomla 1.7.1 and PHP 5.3.3.
For some links in the site map (HTML and XML) I have two notices in PHP log :
Those surprises me is that I do not have two notices for all links of site map and I not see any connection between the links
Regards.
I use Xmap 2.0 with Joomla 1.7.1 and PHP 5.3.3.
For some links in the site map (HTML and XML) I have two notices in PHP log :
- Code: Select all
PHP Notice: Undefined property: stdClass::$priority in /var/www/[...]/joomla-1.7.1/components/com_xmap/displayer.php on line 135
PHP Notice: Undefined property: stdClass::$changefreq in /var/www/[...]/joomla-1.7.1/components/com_xmap/displayer.php on line 136
Those surprises me is that I do not have two notices for all links of site map and I not see any connection between the links
Regards.
Last edited by fredo on Wed Oct 19, 2011 10:48 am, edited 1 time in total.
- fredo
- Fresh Boarder

- Posts: 6
- Joined: Wed Aug 31, 2011 3:35 pm
Re: Undefined property: stdClass::$priority and $changefreq
Hi,
I found the problem, it appears when I insert a separator in the menus. For each separator there are two PHP notices.
In the course of the menus, do not take into account the type separator.
Regards.
I found the problem, it appears when I insert a separator in the menus. For each separator there are two PHP notices.
In the course of the menus, do not take into account the type separator.
Regards.
- fredo
- Fresh Boarder

- Posts: 6
- Joined: Wed Aug 31, 2011 3:35 pm
Re: Undefined property: stdClass::$priority and $changefreq
Hi,
The initialization problem can be corrected by this code:
In the file "components/com_xmap/helpers/xmap.php", line 89, replace :
by:
Regards.
The initialization problem can be corrected by this code:
In the file "components/com_xmap/helpers/xmap.php", line 89, replace :
- Code: Select all
if ($item->type != 'separator') {
$item->priority = $menuOptions['priority'];
$item->changefreq = $menuOptions['changefreq'];
XmapHelper::prepareMenuItem($item);
}
by:
- Code: Select all
if ($item->type != 'separator') {
$item->priority = $menuOptions['priority'];
$item->changefreq = $menuOptions['changefreq'];
XmapHelper::prepareMenuItem($item);
}
else {
$item->priority = '';
$item->changefreq = '';
}
Regards.
- fredo
- Fresh Boarder

- Posts: 6
- Joined: Wed Aug 31, 2011 3:35 pm
Re: [Patch] Undefined property: stdClass::$priority and $cha
Great, thanks for sharing it!! I have added the fix to repository:
https://github.com/guilleva/Xmap/commit/7ae312780fd3ce72c5986f23813535742300f49e
Regards,
Guillermo
https://github.com/guilleva/Xmap/commit/7ae312780fd3ce72c5986f23813535742300f49e
Regards,
Guillermo
-

guilleva - Administrator

- Posts: 1517
- Joined: Wed Sep 12, 2007 3:10 am
- Location: San José, Costa Rica
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 3 guests