Saturday 10 July 2010

Bug in Joomla's file libraries/joomla/environment/uri.php

A week ago I was testing 2 well-known Joomla CCK Components JoomlaWorks K2 and YOOtheme's Zoo 2.0. Since I wanted to test them how they do with multilingual content I wrote first a couple of articles in Greek language and set some tags (also in Greek). The tags which had the Greek letter "ρ" in them didn't behave as they should; what I mean, when I clicked on them they displayed an empty content page (no articles were found), although there were articles tagged with them! I was wondering what the problem could be..

I contacted the support Forums for both K2 and YOOtheme (no answer so far) and told them about that; Lefteris Kavadas from K2 Forum told me he found that the function _parseURL returns some undefined character when a tag has the letter "ρ" in it. I also started a thread at Joomla's official support Forum and asked if they could help (no answer so far).

I was so curious about that and investigated further..well it seems that there is a bug within Joomla's file libraries/joomla/environment/uri.php!

I changed the file libraries/joomla/environment/uri.php (Joomla 1.5.18) by commenting out the following lines of code: 744,745,769-773. In this way the function _parseURL parses the URL with the "old" way as if we were using an older version of PHP.. and guess what, the problem with the undefined character is solved! Now all tags that contain Greek letters (especially the ones with the "ρ" letter) work just fine.

I'm not sure if this fix works with all different versions of PHP (I tested it locally with XAMPP 1.7.3 - PHP 5.3.1 - Joomla 1.5.18), but I'm sure it will help people who had the same problem as I did.

No comments:

Post a Comment