Please make sure to update to WPML 4.3.4 before reporting any issue

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 thread is resolved. Here is a description of the problem and solution.

Problem: When I update the stock for some variable product, the stock is not synchronized with the second language Solution: The issue has been solved in the latest versions of WooCommerce Multilingual

This topic contains 21 replies, has 2 voices.

Last updated by Jitske 2 years, 2 months ago.

Assigned support staff: Vincenzo.

Author Posts
August 25, 2017 at 9:10 am #1350814

Jitske

I am trying to: update the stock. Some variations are back in stock, so we've changed the stock.
After saving the product is back in stock and visible in the default language, but not in the second language.
This happens for variable products as wel as for simple products.

I expected to see: the product back-in stock in both languages.

Instead, I got: the product only back in stock in the DEFAULT language. When we open the translation to the 2nd language and save this again it is visible in 2nd language. But that takes too much time to do this for all products that are back in stock in our shop.

I've tried turning off all non-WPML plugins.
I've tried empty the WPML cache
I've tried recounting terms
But non of this helped.

The problem came when we updated WC from 2.6.14 to 3.1.2.

Thanks for helping us out.

August 25, 2017 at 11:59 am #1350983

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hello, thank you for contacting WPML Support!
I will take care of your ticket.

I tried reproducing this on my test install but I was not able.
- Can you please let me know the exact steps to reproduce this issue?

In the meantime, please try the following steps:
❌ Before proceeding please make a full website backup! ❌
⌥ You can use a plugin for this.
See: http://wordpress.org/plugins/duplicator/

- Go to WooCommerce -> WooCommerce Multilingual -> Status -> Troubleshooting page
- Enable the "Sync product stock quantity and status" option
- Press the "Start" button

Please let me know if this solves the issue or if you need further details.

Thank you

August 28, 2017 at 10:54 am #1352250

Jitske

Hi Vincenzo,

Nope... this did not solve the problem ;-(
Do you have any other ideas on how to fix this?

August 28, 2017 at 3:56 pm #1352568

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hello,

in order to help I need to reproduce the issue.

We have two ways:

1. I need to know the exact steps to reproduce this issue.

2. I would need a site snapshot if possible.
We usually recommend the free Plugin “Duplicator” for this purpose.

If you already know how Duplicator works
(http://wordpress.org/plugins/duplicator/),
please skip the following steps and just send me the installer file and the zipped package you downloaded.

★ Duplicator Instructions
hidden link
https://wpml.org/faq/provide-supporters-copy-site/

If the file is too large (more than 200M), please use the Duplicator file filters to remove the cache, the wp-uploads directory, the media and the archive files.

Send me both files (you probably want to use Google Drive, DropBox, or similar services, as the snapshot file will be quite big)

Your next reply will be private, which means that only you and I will be able to see it and have access to it. You can paste the links to the files there. You can also share the credentials to your website. I will then download the files from the admin panel.
Once the problem is resolved I will delete the local site.

Thank you

September 1, 2017 at 9:13 am #1355822

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hi,

to fix the Fatal error you need to ask the hosting provider to increase the PHP Memory Limit to 256M. Currently, the PHP MemoryLimit is 128M so, even if the WP Memory Limit is manually set to 1024M, the actual memory available to WordPress is just 128M.

I think this may increase the performance of your website too.

In the meantime, I am checking the staging site.
It seems like I was able to log in without problems in the staging site.

I will keep you updated.

Thanks for your patience

September 1, 2017 at 11:22 am #1355915

Jitske

Hi,

Before I told you that the "Sync product stock quantity and status" option did not help.
But I now found out that it didn't run.

When I press start. the wheel spins forever, but the stock is not updated.

September 1, 2017 at 11:34 am #1355921

Jitske

I have now tried turning off all other plugins except Woocommerce and WPML. But than still... it keeps spinning but the stock is not updating.

September 1, 2017 at 11:37 am #1355922

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hello,

I can confirm that.

If you open a browser console before starting the Sync process, you will notice that as soon as you start, a "500 (Internal Server Error)" is shown.

You can check the cause of this error in the web server log.

Sometimes the 500 errors are saved in the WordPress debug log too.
Can you please temporarily enable the WordPress debug mode?

- Open the wp-config.php file and search for this line:

define('WP_DEBUG', false);

- Change it to:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Now the errors will be logged in the debug.log file inside /wp-content/ folder.

The wp-config.php file is inside your WordPress root folder.

Start the stock sync procedure.

Now, please post the content of wp-content/debug.log file here in the forum or on pastebin.com if it is too big.

Related documentation:
- https://wpml.org/documentation/support/debugging-wpml/
- http://codex.wordpress.org/Debugging_in_WordPress
- https://wpml.org/faq/500-error/

September 1, 2017 at 11:49 am #1355930

Jitske

When I open the console (F12), I see this error message :

POST hidden link 500 (Internal Server Error)
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-ui-but&load[]=ton,jquery-ui-position,jquery-ui-dialog,utils,jquery-ui-sortable,underscore,wp-util,jquery-ui-progress

And in the error log there is this:
POST hidden link 500 (Internal Server Error)
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-ui-but&load[]=ton,jquery-ui-position,jquery-ui-dialog,utils,jquery-ui-sortable,underscore,wp-util,jquery-ui-progress

[error] 14944#14944: *1479099 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/frchou-rogovitsy/wordpress/current/wp-includes/meta.php on line 838" while reading response header from upstream, client: 84.87.153.196, server: chouchous.fr, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "hidden link:", host: "chouchous.fr", referrer: "hidden link"

PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/frchou-rogovitsy/wordpress/current/stage_chouchous/wp-includes/plugin.php on line 449" while reading response header from upstream, client: 84.87.153.196, server: babybio.nl, request: "POST /stage_chouchous/wp-admin/admin-ajax.php HTTP/1.1", upstream: "hidden link:", host: "babybio.nl", referrer: "hidden link"

September 1, 2017 at 5:04 pm #1356247

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hello,

it seems like the hosting provider increased the MemoryLimit to 256M.

1. Can you please tell me what are the products where I can see the issue?

2. Do I have the permission to change the stock quantity and to enable and disable the plugins in the staging site?

Thank you

September 1, 2017 at 7:05 pm #1356343

Jitske

Yes, the hoster increased the MemoryLimit to 256M.

1. products where you can see the issue:
All products;-) simple and variable.
You can try this one for example: hidden link
How to reproduce the problem:
- change the stock for variation size S-M to '2 in stock' and save
- as you can see the product is visible on the category page in French (hidden link)
- as you can see the product is not visible on the category page in Dutch (hidden link)

2. "Do I have the permission to change the stock quantity and to enable and disable the plugins in the staging site?"
Yes, you have in the STAGING site you have permission to do so.
Please be very sure all the time that you are on the staging site and not the live site.

September 2, 2017 at 3:36 pm #1356578

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hello,

sorry for the delay.

I tested the product and when I changed the stock quantity in the original language product, the stock was updated in the translated product too.

However, the product was not displayed in the Dutch category page and the price of the translated product was 0€

To fix those issues try the following steps:
❌ Before proceeding please make a full website backup! ❌

- Go to WPML -> Support -> Troubleshooting
- Scroll down to the "Clean" section
- Select Products
- Press the "Synchronize post taxonomies" button
- Wait for the process to finish
- Select Variations
- Press the "Synchronize post taxonomies" button
- Wait for the process to finish
- Go to the edit product page in the original language and update the product.

Please let me know if this solves the issue or if you need further details.

Thank you

September 3, 2017 at 8:27 am #1356690

Jitske

Hi Vincenzo,

You conclusion is right; "However, the product was not displayed in the Dutch category page and the price of the translated product was 0€"

Only ... your solution does't work.
I've tried to Synchronize post taxonomies for products and variations, but the problem is still the same;-(

September 4, 2017 at 8:38 am #1357058

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hello,

after the steps in my previous post, this is what I did:
- Go to the product edit page
- Changed the stock for the variations
- Saved the Variations
- Updated the product

and the issue seems solved. I could see the correct prices in both the original and translated product and the product was shown in the category archive page in both languages.

Can you please post the exact steps list to reproduce the issue?

Thank you

September 4, 2017 at 9:49 am #1357283

Jitske

Hi,

I've done exactly the same:
- Go to the product edit page
- Changed the stock for the variations
- Saved the Variations
- Updated the product

I've tested with a variable product and also with a simple product, but in Dutch (2nd language) the product is not visible in the category archive.

I've tested this on staging site and on the live site.