use URL like this to check the proper functionality of the language:
index.php?option=com_ajax&module=virtuemart_bohcatfilter&format=raw&nosef=1&lang=fr&ict=36
we are using:
\modules\mod_virtuemart_bohcatfilter\helper.php
class modVirtuemartBohcatfilterHelper {
public static function getAjax() {
$lang = JFactory::getLanguage();
$language_tag = $lang->getTag();
var_dump($language_tag); die();
}
}
you can see that the language_tag was IMPROPERLY SET to joomla's default language regarless of the configuration of the language filter plugin and the current value of the language cookie
FIX:
we found that altering line:
274: else
to
274: if (empty($lang_code))
fixes the problem.
More lines:
....
// We have found our language and the first part of our URL is the language prefix
if ($found)
{
array_shift($parts);
$uri->setPath(implode('/', $parts));
}
}
}
if (empty($lang_code))
{
// We are not in SEF mode
$lang = $uri->getVar('lang');
if (isset($this->sefs[$lang]))
{
// We found our language
$found = true;
$lang_code = $this->sefs[$lang]->lang_code;
}
}
in \plugins\system\languagefilter\languagefilter.php
JOOMLA 3.4.0
Furthermore the plugin SHOULD NOT DO A REDIRECT from within an Ajax context because it can easily redirect the user to the Ajax page for some old Chrome, Firefox or IE browsers. In short, there must not be any redirects from within the ajax context.
Before doing any redirect there can be a check done:
$doc = JFactory::getDocument();
$class = class_name($doc);
$class = strtoupper($class);
if ($class === 'JDOCUMENTHTML') ...
Ideal result:
1. No redirect to SEF from ajax context
2. Proper language detection
Category | ⇒ | Multilanguage Plugins |
Labels |
Added:
?
|
Please test again after applying both these patches:
Status | New | ⇒ | Information Required |
Set to information required.
@stAn47 Please can you comment if the fixes linked to by @infograf768 work for you or if this is still an issue after applying those fixes
It is a serious problem so I would like to test can you send me the files so I can upload them with ftp sorry Im not a programmer
The easiest way to to test is to install com_patchtester and then use that to apply the two patches @infograf768 suggested
You can download com_patchtester from here https://docs.joomla.org/Component_Patchtester_for_Testers
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-03-14 10:36:11 |
Closed_By | ⇒ | brianteeman |
Closed_Date | 2015-03-14 10:36:11 | ⇒ | 2015-03-14 10:36:12 |
Please see https://docs.joomla.org/J3.x:Infinite_error_loop_on_multilanguage_sites is this related to your issue?