Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 6 replies, has 2 voices.

Last updated by ilanaG 3 years, 6 months ago.

Assigned support staff: George Botsev.

Author Posts
January 17, 2017 at 5:22 pm #1184203

ilanaG

I am trying to:

Update to the latest version of WooCommerce multilingual, but it generates a fatal error. I've tried switching to a default WP theme and so I know it's not related to my theme.

URL of (my) website where problem appears: any

I expected to see:

Instead, I got:
hidden link

Steps to duplicate the issue:
Revert website back to a backup and then update the WooCommerce Multilingual plugin

Using WPML Version 3.4.0

January 18, 2017 at 7:46 am #1184561

George Botsev
Supporter

Languages: English (English )

Timezone: Europe/Sofia (GMT+03:00)

Hello and thank you for contacting us.
The issue happens because you have a relatively old version of WPML installed.
There are two ways on how to fix the problem.
1. Update WPML to the latest version.
2. Go to /wp-content/plugins/woocommerce-multilingual/inc/wcml-switch-lang-request.php and patch the code replacing the function get_requested_lang() with:

public function get_requested_lang() {

       return $this->is_comments_post_page() ? $this->get_cookie_lang() : $this->get_request_uri_lang();
   }

   public function is_comments_post_page() {
       global $pagenow;

       return 'wp-comments-post.php' === $pagenow;
   }

Please remember to backup your database and files first before you proceed! You can use a plugin for this if you like (example: http://wordpress.org/plugins/duplicator/)

January 18, 2017 at 8:17 am #1184584

ilanaG

Thank you for looking into this.
I didn’t realize I had an old version of WPML. Why didn’t I see a message on the Plugins page or Updates dashboard that I needed to update WPML? When I go to this page hidden link it shows me that there are updates but doesn’t actually let me update to the latest version. Then if I go back to the list of installed plugins I don’t see a link to “update now”. Why is that?

January 18, 2017 at 9:01 am #1184639

George Botsev
Supporter

Languages: English (English )

Timezone: Europe/Sofia (GMT+03:00)

This is very strange.
Could you try to go to Dashboard > Updates and press the button to check for new updates?
Also what happens when you go and press the button Check for update in the commercial tab?
Maybe there is some server-side cache that influences your site. I am not sure why this happens.
Can you disable all caches on your server?

January 18, 2017 at 10:29 am #1184757

ilanaG

This is what it shows when I click "check for updates". I have a caching plugin, but I purged the cache.

January 18, 2017 at 10:46 am #1184783

George Botsev
Supporter

Languages: English (English )

Timezone: Europe/Sofia (GMT+03:00)

Could you please check if you have more than one version of WPML plugin in your plugins page?
Perhaps you have older versions that are currently disabled?
Maybe it would be best if you can get a fresh copies of WPML and replace the current ones.

January 18, 2017 at 11:37 am #1184832

ilanaG

No, but I noticed that now that I have the latest version of WPML, when I upgrade WooCommerce Multilingual I don't get that error message anymore.