Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 - -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 0 voices.

Last updated by ingeE-3 1 day, 2 hours ago.

Assisted by: Noman.

Author Posts
August 6, 2025 at 9:35 am #17298952

ingeE-3

Background of the issue:
I am trying to use WPML with WooCommerce. EN is my main language, and NL is the second. When I look at an EN product in WooCommerce and click the Translate button to open the WPML translation editor (legacy), I encounter an error. Link to a page where the issue can be seen: hidden link

Symptoms:
Uncaught Error: key(): Argument #1 ($array) must be of type array, null given in /var/www/html/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php on line 385. The error occurs when trying to open the WPML translation editor.

Questions:
Why am I getting an error when trying to open the WPML translation editor?
How can I resolve the error related to the key() function in the translation editor?

August 7, 2025 at 7:37 pm #17303950

ingeE-3

Problem
Fatal error when opening the Legacy Translation Editor for a WooCommerce variable product after editing any variation.

Error:
key(): Argument #1 ($array) must be of type array, null given in class-wcml-editor-ui-product-job.php on line 385

WPML is set to use the Legacy Editor.
In WPML > Translation Management, affected products show a spinning loading icon under the language flag.
Translation jobs for these products are not accessible or cancelable.
No visible way to reset the job.

What we tried:

- Reproduced the issue with a clean test product step-by-step:

Created new product → changed to variable → added variations

Entering data into any variation field (e.g. price, weight) triggers the error

- Confirmed issue happens only when variation data is present

- Filled in all fields for all variations → error still occurs

Advanced Translation Editor is disabled, and Legacy Editor is selected
No “trash icon” or cancel option appears for the gear icon
Stuck translation jobs do not appear in Translation Queue
The following tools are missing from WPML > Support > Troubleshooting:
“Fix incomplete jobs”
“Delete jobs from professional translation service”
“Synchronize post meta fields”

Ran available troubleshooting tools:
“Remove ghost entries”
“Synchronize product data”

Confirmed that the now-deprecated Translation Management plugin is no longer available

PHP version is 8.3.20 on production and 8.3.21 on staging
Same plugins and settings on staging — issue does not occur there

❓ What we need help with
How to fully delete or reset the stuck translation job(s) showing a gear icon and spinning status

How to prevent this error when entering data into a product variation

Whether this is a known issue in the WCML_Editor_UI_Product_Job logic

What the new procedure is (in WPML’s current plugin architecture) for handling broken jobs, now that the Translation Management plugin and its cleanup buttons are deprecated

Screenshot 2025-08-07 at 21.00.52.png
August 7, 2025 at 7:38 pm #17303966

ingeE-3

I can not disable all plugins on production to re-activate them one by one. My hope was to do that on stage, but there the error can not be reproduced.