Difference between revisions of "Multilingual-problems-after-updating-to-2.5.11-or-3.1.1"

From Joomla! Documentation

(Created page with "Some (but not all) multilingual sites experience a problem where all content not in the default language is not displayed and the language filter module does not seem to work....")
 
Line 1: Line 1:
 
Some (but not all) multilingual sites experience a problem where all content not in the default language is not displayed and the language filter module does not seem to work.  Although an official fix is not yet announced, this is related to the change to language cookie handling that was introduced.  As a first step  try opening the language filter plugin and set the cookie lifetime to year and see if that solves the problem.  If it does not as a '''temporary''' solution you may want to revert the change to the plugin. To do so take the code from the code below and change the plugin. Delete the lines with + at the beginning and add the lines with - at the beginning in the file plugins/system/languagefilter/languagefilter.php.
 
Some (but not all) multilingual sites experience a problem where all content not in the default language is not displayed and the language filter module does not seem to work.  Although an official fix is not yet announced, this is related to the change to language cookie handling that was introduced.  As a first step  try opening the language filter plugin and set the cookie lifetime to year and see if that solves the problem.  If it does not as a '''temporary''' solution you may want to revert the change to the plugin. To do so take the code from the code below and change the plugin. Delete the lines with + at the beginning and add the lines with - at the beginning in the file plugins/system/languagefilter/languagefilter.php.
  
<source: php>
+
 
  
 
  @@ -82,7 +84,7 @@
 
  @@ -82,7 +84,7 @@
Line 22: Line 22:
 
  }
 
  }
  
</source>
+
 
  
 
<noinclude>
 
<noinclude>
 
[[Category:Version 2.5 FAQ]][[Category:Version 2.5.11 FAQ]][[Category:Version 3.1.0 FAQ]][[Category:Version 3.1.1 FAQ]]
 
[[Category:Version 2.5 FAQ]][[Category:Version 2.5.11 FAQ]][[Category:Version 3.1.0 FAQ]][[Category:Version 3.1.1 FAQ]]
 
</noinclude>
 
</noinclude>

Revision as of 19:56, 27 April 2013

Some (but not all) multilingual sites experience a problem where all content not in the default language is not displayed and the language filter module does not seem to work. Although an official fix is not yet announced, this is related to the change to language cookie handling that was introduced. As a first step try opening the language filter plugin and set the cookie lifetime to year and see if that solves the problem. If it does not as a temporary solution you may want to revert the change to the plugin. To do so take the code from the code below and change the plugin. Delete the lines with + at the beginning and add the lines with - at the beginning in the file plugins/system/languagefilter/languagefilter.php.


@@ -82,7 +84,7 @@
					$conf = JFactory::getConfig();
					$cookie_domain 	= $conf->get('config.cookie_domain', );
					$cookie_path 	= $conf->get('config.cookie_path', '/');
-					setcookie(JApplication::getHash('language'), $lang_code, time() + 365 * 86400, $cookie_path, $cookie_domain);
+					setcookie(JApplication::getHash('language'), $lang_code, $this->getLangCookieTime(), $cookie_path, $cookie_domain);
					// set the request var
					JRequest::setVar('language', $lang_code);
				}
@@ -355,7 +357,7 @@
					$conf = JFactory::getConfig();
					$cookie_domain 	= $conf->get('config.cookie_domain', );
					$cookie_path 	= $conf->get('config.cookie_path', '/');
-					setcookie(JApplication::getHash('language'), $lang_code, time() + 365 * 86400, $cookie_path, $cookie_domain);
+					setcookie(JApplication::getHash('language'), $lang_code, $this->getLangCookieTime(), $cookie_path, $cookie_domain);
				}
			}
		}