- Status
- Resolved
- Reported for
- WPML Multilingual CMS 3.3.6
- Resolved in
- WPML String Translation 2.3.7
Overview of the issue
When setting the admin language to a non-active language, WPML String Translation may throw a fatal error.
Example:
- Activate WPML with only “English” as default language, and “Italian” other language
- In WPML->Languages select French as default admin language
- You get either a white page or a message showing the fatal error
Workaround
The next version of String Translation will contain the fix to this issue.
Meanwhile, you can follow the following steps to fix it in your installation.
Before doing that, make sure to make a copy of the edited file before editing it, and a backup of your site.
- Open this file: wpml-string-translation/inc/wpml-string-translation.class.php
- Look for the line which contains function init_active_languages() { .
- Change the whole function from this:
function init_active_languages() { global $sitepress; $this->active_languages = array_keys( $sitepress->get_active_languages() ); } - To that:
function init_active_languages() { $this->active_languages = array_keys( $this->sitepress->get_languages() ); } - Save the file