1) Joomla! 1.5.14 installed at http:://mydomain.dom/cms
2) Joom!Fisch 2.0.4 (Lightning) with JFRouter activated
3) System - SEF (default) activated
Translation and routing tasks perform fine but JURI misbehaves when JFRouter is in place. JURI::getInstance() is expected to return the current request URL (corrected by value of $live_site), i.e. if the user typed "http://mydomain.dom/cms/en/article" and $live_site is not set, the result of JURI::getInstance() is expected to be "http://mydomain.dom/cms/en/article" as well but JFRouter manipulates the static cache of JURI (in several places in jfrouter.php) like this:
- Code: Select all
$uri =& JURI::getInstance();
This accomplishes that every subsequent call of JURI::getInstace() returns "http://mydomain.dom/cms/article?lang=en". You might say: "So what's the difference? The URL points to the same page after all..." Unfortunately the difference is a fatal breach in site usability and accessibility caused by this "little" change.
First of all links of the kind:
- Code: Select all
<a href="#someanchor">go there</a>
cease functioning as Joomla! sets <base href=""> in every document to the value of JURI::base() and this doesn't correspond with requested URL anymore thanks to JFRouter, so the link above starts pointing to "http://mydomain.dom/cms/article#someanchor" instead of "http://mydomain.dom/cms/en/article#someanchor" (which would be the current page). The unnecessary page reload is the very least evil in this case: if current language isn't the default the user ends up with the different (and wrong) translation!
Furthermore there are plenty of templates and extensions out there that ALL (as far as I can judge looking in the source code) rely on JURI:getInstance() returning exactly the request URI as typed by user or set by a redirect and most of them begin to show strange hiccups or stop working at all after installation of Joom!Fish. Whatever one may think about the quality of such components or wisdom of their creators - in any case Joomla! Core authors are among the suffering with all their templates shipping with installation package, this is IMHO not acceptable that one single component (Joom!Fish) overrules all others.
Last but not least there is a SEF issue too. For every place on the page where JURI::current() (alias JURI::getInstance()->toString()) is used as reference to the current location the site owner earns negative points from search engines (for so called "link farming": different links to the same content) because links generated by the router ("http://mydomain.dom/cms/en/article") and JURI ("http://mydomain.dom/cms/article?lang=en") are meant to be but are not the same - however they used to before JFRouter came along and shuffled the things over.
All my attempts (for example following the hint in comments from jfrouter.php itself: "Consider stripping base path from URI") to force JFRouter in peaceful coexistence with JURI failed so far. Has anyone an idea how to overcome this without disabling all SEF routing at once?