Skip Navigation

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

4 Responses to “Warnings in some Windows server from WPML-CMS-NAV and Sticky-Links”

  1. Hy!

    I have only sitepress-multilingual-cms/sitepress.php file that contains that 3 lines. I removed them and Saved.

    Than I tried to turn ON the WPML Multilingual CMS plugin, but Fatal error occurred:

    Fatal error: Class ‘WPML_WPDB_User’ not found in /chroot/home/tamaspal/tamaspalfalvi.com/html/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-post-comments.class.php on line 3

    • Laki, as explained in this errata, this workaround only applies to WPML-CMS-NAV and Sticky Links.

      Please use the beta version in a non production site, to check that the issue is fixed.

      We are closing our QA now. As soon as it’s done, we will take out WPML 3.3.4 from the beta.

  2. Hi, I have this one (after update do 3.3.): Warning: Invalid argument supplied for foreach() in /mnt/data/accounts/r/rodeista/data/www/wctips/www/wp-content/plugins/sitepress-multilingual-cms/embedded/wpml/commons/src/wpml-auto-loader.php on line 155

    And option one or option to doesnt help 🙁

    • Hi Tomas,

      Please report the issue in our forum, where we can ask you more details we can’t ask here.

      Also, you may want to give the beta version a try, as long as you can test it in a non production site.

      We are closing our QA now. As soon as it’s done, we will take out WPML 3.3.4 from the beta.