URL incorrectly formed (patch incl.)
2 posts
• Page 1 of 1
URL incorrectly formed (patch incl.)
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
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

- Posts: 1
- Joined: Tue Sep 30, 2008 11:04 pm
Re: URL incorrectly formed (patch incl.)
Hi, thanks for the patch, I have added into the development version
-

guilleva - Administrator

- Posts: 1517
- Joined: Wed Sep 12, 2007 3:10 am
- Location: San José, Costa Rica
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest