XML priority tag always zero for all plugin items
13 posts
• Page 1 of 2 • 1, 2
XML priority tag always zero for all plugin items
I cannot seem to get the XML sitemap to display the priority for items that are controlled by extensions. The change frequency responds correctly according to the individual settings but the priority is always set to zero regardless of what setting is specified.
Has anybody else had this problem?
I'm running Xmap 1.1 on Joomla 1.0.15, with the following extensions: Content 1.0.1, DOCman 1.0.2, Fireboard 1.0.0, Zoom 1.0.0.
Has anybody else had this problem?
I'm running Xmap 1.1 on Joomla 1.0.15, with the following extensions: Content 1.0.1, DOCman 1.0.2, Fireboard 1.0.0, Zoom 1.0.0.
- csommer
- Junior Boarder

- Posts: 23
- Joined: Sun Apr 13, 2008 11:26 pm
Re:XML priority tag always zero for all plugin items
If a priority setting of 1 is selected then it shows "1" in the priority tag. Any other setting produces "0" in the tag. If "Use Parent Menu Setting" is selected then the correct parent setting is shown. Could it be that the extension priority setting is being truncated after the first digit? After all, a parent menu priority of "0" produces "0.0" in the xml tag as opposed to simply "0".
- csommer
- Junior Boarder

- Posts: 23
- Joined: Sun Apr 13, 2008 11:26 pm
Re:XML priority tag always zero for all plugin ite
Me too!
The problem seems to be that the joomla seems to assume that numeric parameters are all whole numbers - see this fragment of code from includes/joomla.php
I guess the fix would be to store the parameters as whole numbers between 0 and 10 and divide by 10 when creating the XML file but that's a bit beyond me :(
The problem seems to be that the joomla seems to assume that numeric parameters are all whole numbers - see this fragment of code from includes/joomla.php
- Code: Select all
if (!empty($return) && is_numeric($def)) {
// if value is defined and default value is numeric set variable type to integer
$return = intval($return);
}
I guess the fix would be to store the parameters as whole numbers between 0 and 10 and divide by 10 when creating the XML file but that's a bit beyond me :(
- lwillis
- Fresh Boarder

- Posts: 10
- Joined: Thu Apr 24, 2008 7:54 pm
Re:XML priority tag always zero for all plugin ite
As a temporary fix you can use the following to get these working.
with
and
with
in the file
This isn't the right fix as it bypasses some input sanitzation that should be done from a security point of view - but if you're administering your own site it's probably OK :)
- Code: Select all
$priority = mosGetParam($params,'prod_priority',$parent->priority);
with
- Code: Select all
$priority = $params['prod_priority'];
and
- Code: Select all
$priority = mosGetParam($params,'cat_priority',$parent->priority);
with
- Code: Select all
$priority = $params['cat_priority'];
in the file
- Code: Select all
administrator/components/com_xmap/extensions/com_virtuemart/com_virtuemart.php
This isn't the right fix as it bypasses some input sanitzation that should be done from a security point of view - but if you're administering your own site it's probably OK :)
- lwillis
- Fresh Boarder

- Posts: 10
- Joined: Thu Apr 24, 2008 7:54 pm
Re:XML priority tag always zero for all plugin ite
Hi, which version of Joomla/Xmap are you using, I can not reproduce the problem!!
-

guilleva - Administrator

- Posts: 1517
- Joined: Wed Sep 12, 2007 3:10 am
- Location: San José, Costa Rica
Re:XML priority tag always zero for all plugin ite
Joomla v1.0.15, com_xmap v1.1, com_virtuemart extension v1.1
- lwillis
- Fresh Boarder

- Posts: 10
- Joined: Thu Apr 24, 2008 7:54 pm
Re:XML priority tag always zero for all plugin ite
Thanks! Still I cannot reproduce the problem in that environment! :(
I'm going to keep trying!
I'm going to keep trying!
-

guilleva - Administrator

- Posts: 1517
- Joined: Wed Sep 12, 2007 3:10 am
- Location: San José, Costa Rica
Re:XML priority tag always zero for all plugin ite
Hmmm, weird - do you have this bit of code in your includes/joomla.php
As that appears to be the culprit ...
- Code: Select all
if (!empty($return) && is_numeric($def)) {
// if value is defined and default value is numeric set variable type to integer
$return = intval($return);
}
As that appears to be the culprit ...
- lwillis
- Fresh Boarder

- Posts: 10
- Joined: Thu Apr 24, 2008 7:54 pm
Re:XML priority tag always zero for all plugin ite
As mentioned above, I'm running Xmap 1.1 on Joomla 1.0.15 with these extensions: Docman 1.0.2, Foreboard 1.0.0 and Zoom 1.0.0.
Thanks, lwillis your suggestions work great for me. I tried it on the content plugin (1.0.1), com_content.php, and modified it as follow:
line 54:
line 65:
For the Fireboard extention, com_fireboard.php, as follows:
line 28:
line 38:
I assume that this will work on the other extensions I'm using too.
Thanks, lwillis your suggestions work great for me. I tried it on the content plugin (1.0.1), com_content.php, and modified it as follow:
line 54:
- Code: Select all
$priority = $params['cat_priority'];
line 65:
- Code: Select all
$priority = $params['art_priority'];
For the Fireboard extention, com_fireboard.php, as follows:
line 28:
- Code: Select all
$priority = $params['cat_priority'];
line 38:
- Code: Select all
$priority = $params['topic_priority'];
I assume that this will work on the other extensions I'm using too.
- csommer
- Junior Boarder

- Posts: 23
- Joined: Sun Apr 13, 2008 11:26 pm
Re:XML priority tag always zero for all plugin ite
Should do - although it's not the right fix ....
- lwillis
- Fresh Boarder

- Posts: 10
- Joined: Thu Apr 24, 2008 7:54 pm
13 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest