Friday, 31 October 2014 15:48
beggarly

home page URL bug with v1.2.4

Report Xmap bugs on this forum.

home page URL bug with v1.2.4

Postby error4o4 » Sat Dec 12, 2009 1:15 pm

I just updated from v1.2.2 to v1.2.4 and everything is fine, except the home page link in the sitemap has changed from :
http://www.site.org/
to :
http://www.site.org/index.php?Itemid=53?Itemid=53

Browsing through the jos_menu table, I see the record for the home page in the main menu has an id of 53, but the link_field is "index.php?Itemid=1" so why does Xmap use the menu id instead of the link itemid ?
error4o4
Fresh Boarder
Fresh Boarder
 
Posts: 8
Joined: Tue Nov 18, 2008 11:45 am

Re: home page URL bug with v1.2.4

Postby guilleva » Sat Dec 12, 2009 7:04 pm

Hi, thanks for writing your problem in the forum.

Let me get this a little more clear. So have a menu item, of the kind "External Link" with the url "index.php?Itemid=1" and Xmap is changing "Itemid=1" by "Itemid=51?Itemid=51"?
User avatar
guilleva
Administrator
Administrator
 
Posts: 1527
Joined: Wed Sep 12, 2007 3:10 am
Location: San José, Costa Rica

Re: home page URL bug with v1.2.4

Postby error4o4 » Sun Dec 13, 2009 10:45 am

Sorry this wasn't clear, your question is a good one !
The menu item has type "menulink", it links to the "home page" menu. The "link" field for the item is indeed "index.php?Itemid=1"

The menu item with this problem is the "accueil" item in the upper menu, it is linked to the "accueil" item in the menu on left.

With Xmap v1.2.2, on the sitemap, both "accueil" links linked to http://www.site.org/ and now the first one (the "menulink" one) wrongly links to http://www.site.org/index.php?Itemid=53?Itemid=53

[edit:removed urls]
Last edited by error4o4 on Sun Dec 13, 2009 8:15 pm, edited 1 time in total.
error4o4
Fresh Boarder
Fresh Boarder
 
Posts: 8
Joined: Tue Nov 18, 2008 11:45 am

Re: home page URL bug with v1.2.4

Postby guilleva » Sun Dec 13, 2009 7:37 pm

Hi, thanks for your explanation, I have found the problem and I have fixed it in the development version. If you want to fix your installation and cannot wait for the next release, (to be released probably in a few days) you can edit the file /components/com_xmap/xmap.php:

line 354:
Code: Select all
            if ($newItem = $menu->getItem($params->get('menu_item'))) {
               $item->type = $newItem->type;
               $item->mid = $newItem->id;
               $item->parent = $newItem->parent;
               $item->link = $newItem->link;
            }


Inside the if block, add the line:
$item->home = $newItem->home;

so it should look something like the following:

Code: Select all
            if ($newItem = $menu->getItem($params->get('menu_item'))) {
               $item->type = $newItem->type;
               $item->mid = $newItem->id;
               $item->parent = $newItem->parent;
               $item->link = $newItem->link;
               $item->home = $newItem->home;
            }
User avatar
guilleva
Administrator
Administrator
 
Posts: 1527
Joined: Wed Sep 12, 2007 3:10 am
Location: San José, Costa Rica

Re: home page URL bug with v1.2.4

Postby error4o4 » Sun Dec 13, 2009 8:18 pm

I applied the patch and it fixed the problem.
Thank you very much for your quick and effective support. Xmap really is a great component, and you do a good job supporting it !
error4o4
Fresh Boarder
Fresh Boarder
 
Posts: 8
Joined: Tue Nov 18, 2008 11:45 am


Return to Bugs



Who is online

Users browsing this forum: Bing [Bot] and 1 guest