Hello,
i am using ARTIO JoomSEF for some time and i would like to ask if is there some GIT repository or any option how to "Pull Request" some changes i made in This product and i think it would be good for everyone to apply it in next release.
Here are 2 things i think that should work better.
Both is when you use multilanguage site.
1)
// Redirect root URL to URL with language code
Here is problem with this line 853 in file com_sef/joomsef.php
JFactory::getApplication()->redirect(JRoute::_($link), '', 'message', true);
This makes redirection
'HTTP/1.1 301 Moved Permanently' from root domain to default language url.
BUT when user change language to some other its set in cookie... And when he come next time to root domain it switch back do default language, because 301 redirection is saved in browser cache and its more powerful than cookies...
I suppose to change this line to this:
JFactory::getApplication()->redirect(JRoute::_($link));
This makes only
'HTTP/1.1 303 See other' redirection.
Anyway i think 307 redirection would be even better.
2)
// Correct FaLang support for translations
Here is problem with code between lines 141 - 156 in file com_sef/joomsef.php
if ($sefConfig->langEnable && $check == false) {
$langVar = $uri->getVar('lang');
if (!empty($langVar)) {
$langCode = JoomSEF::getLangCode($langVar);
if (!is_null($langCode)) {
$curCode = JoomSEF::getLangCode();
if ($langCode != $curCode) {
// URL language is different from current language,
// change current language for correct translations
$language = JFactory::getLanguage();
$prevLang = $language->setLanguage($langCode);
$language->load();
}
}
}
}
this whole part of loading language of URL destination is problematical in some cases.
For instance if you have language swither module on your website. It makes loading all language files and redefine all global lang constans that comes in webpage after this module to thle language of the last language link in this module...
I have removed this code and i do not think it makes anythink wrong. Now i do not load language files i do not need.
I dont know if there are any other reasons why ARTIO works this way, but anyone can tell me reason.
And i think these 2 "bugs" makes troubles to many users, because i spen quite lot of hours to figure it out.