Skip Navigation

Resolved

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:

1
2
3
private function is_site_registered() {
    return false !== WP_Installer_API::get_site_key( 'wpml' );
}

with the following, updated function code:

1
2
3
4
5
6
7
private function is_site_registered() {
    if (class_exists('WP_Installer_API')) {
 
    return false !== WP_Installer_API::get_site_key( 'wpml' );
    }
    return false;
}

One Response to “Issue with adding a Nextgen Gallery to posts and pages”

  1. This was bothering me for 3 hours yesterday, this and broken pagination on front-end. Problem was I didn’t get any error at all, no fatal, no warning not even a notice. This workaround fixed it so thank you and please include it in core as soon as possible 🙂