- Status
- Resolved
- Resolved in
- WPML Multilingual CMS 3.8.4
Overview of the issue
While editing a post or page, if you use the button to insert a gallery on the same page, then the following fatal error is displayed:
- Fatal error: Class ‘WP_Installer_API’ not found in …/sitepress-multilingual-cms/classes/end-user/class-wpml-end-user-loader-factory.php on line 72
Workaround
This issue will be fixed in the future WPML release. For now, you can use the following workaround.
Edit the ../sitepress-multilingual-cms/classes/end-user/class-wpml-end-user-loader-factory.php file and replace the function on line 71:
private function is_site_registered() {
return false !== WP_Installer_API::get_site_key( 'wpml' );
}
with the following, updated function code:
private function is_site_registered() {
if (class_exists('WP_Installer_API')) {
return false !== WP_Installer_API::get_site_key( 'wpml' );
}
return false;
}