Monday, 22 December 2014 14:57

URL incorrectly formed (patch incl.)

Report Xmap bugs on this forum.

URL incorrectly formed (patch incl.)

Postby eisaacson » Tue Sep 30, 2008 11:53 pm

Xmap incorrectly forms a url when the following conditions are true:

1) $node->type equals 'url'
2) $node->link points to an internal link not starting with index.php
3) $juri is associated with a particular port

For instance, let say the site is hosted on localhost:8008.

mysql> select name, type, link from jos_menu where name="Blog";
| name | type | link |
| Blog | url | /site/wordpress |
1 row in set (0.00 sec)

xmap then produces:

<li><a href="http://localhost//site/wordpress" title="Blog">Blog</a></li>

when is should be:

<li><a href="http://localhost:8008/site/wordpress" title="Blog">Blog</a></li>

The attached patch fixes this situation, although I have not tested it extensively. It also tests for a leading / in the link field to get rid of the // after the host. The component works great by the way, thanks for writing it ;)

Elliot Isaacson

PS The system is rejecting my attachment. It doesn't like the extension .patch or .txt. So here it is:
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Tue Sep 30, 2008 11:04 pm

Re: URL incorrectly formed (patch incl.)

Postby guilleva » Wed Oct 01, 2008 2:00 pm

Hi, thanks for the patch, I have added into the development version
User avatar
Posts: 1527
Joined: Wed Sep 12, 2007 3:10 am
Location: San José, Costa Rica

Return to Bugs

Who is online

Users browsing this forum: No registered users and 2 guests