FaLang 2.8.1 - fatal error
- Last revised:
- Dienstag, 07. Februar 2017
Answer
When using JoomSEF with FaLang 2.8.1 you might experience the following error after FaLang Language Switcher module is enabled:
PHP Fatal error: Call to a member function get() on null in /public_html/modules/mod_falang/tmpl/default.php on line 35
This is caused by FaLang's module not working correctly when System - Language Filter plugin is disabled (which is required for JoomSEF to work properly). Until FaLang fixes this in some upcoming version, you can apply the fix to the module yourself.
Steps to fix the error:
- Backup the original file
/modules/mod_falang/tmpl/default.php
before doing any modifications! - Open the
/modules/mod_falang/tmpl/default.php
file with a text editor to edit it -
Find line number 35 which should be:
if ($filter_plugin_params->get('alternate_meta', 1))
-
Replace the line with the code:
if (!empty($filter_plugin_params) && $filter_plugin_params->get('alternate_meta', 1))
- Save the modified file
After this modification the FaLang Language Switcher plugin should work correctly with JoomSEF again.