WPML
Status
Resolved
Reported for
WPML Multilingual CMS 3.3.3
Resolved in
3.3.4

Overview of the issue

In some Windows server environments, WPML-CMS-NAV and Sticky-Links may throw some warnings.

A warning like this could be shown in some WAMP stacks (Windows + Apache + MySQL + PHP):

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mydomain.com/httpdocs/wp-content/plugins/wpml-cms-nav/embedded/wpml/commons/src/wpml-auto-loader.php on line 155

Workaround

This issue will be removed on the next update of both affected plugins.

Meanwhile there are two possible workarounds: both will provide the same result.

Please note that what follows only applies to WPML-CMS-NAV and Sticky Links: don’t use this on other plugins.


  • Option one:

    1. Edit the `plugin.php` file of both WPML-CMS-NAV and Sticky Links

    2. Remove lines from 17 to 19. E.g.:
      require_once 'embedded/wpml/commons/autoloader.php';
      $wpml_auto_loader_instance = WPML_Auto_Loader::get_instance();
      $wpml_auto_loader_instance->register( WPML_STICKY_LINKS_PATH . '/' );
      

    3. Save

  • Option two: add a subfolder called “classes” to the root of both WPML-CMS-NAV and Sticky Links plugin folders

All known issues →