Saturday, 25 October 2014 22:50
beggarly

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 ;)

Regards,
Elliot Isaacson


PS The system is rejecting my attachment. It doesn't like the extension .patch or .txt. So here it is: http://dark-code.bulix.org/k6xl4q-68509?raw
eisaacson
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
guilleva
Administrator
Administrator
 
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 3 guests

cron