Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing a critical error when trying to translate a product using WooCommerce Multilingual, you're not alone. This issue may not occur for all products, but it can happen for most.
Solution:
We have identified this as a known issue and a fix will be included in the next update of our plugins. In the meantime, we recommend applying a temporary workaround. Please ensure you have a backup of your site before proceeding. You will need to edit the file

/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php

. On line 602, change the code from:

$custom_fields = $this->get_custom_field_values( $this->product_id, $custom_field );

to:

$custom_fields = $this->get_custom_field_values( $element_id, $custom_field );

After making this change, please check if the issue is resolved on your production site.

If this solution doesn't look relevant to your issue, please don't hesitate to open a new support ticket with us here.

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 3 replies, has 2 voices.

Last updated by Kor 10 months ago.

Assisted by: Kor.

Author Posts
January 15, 2024 at 5:19 pm

jaredM-7

Translating a product shows critical error

January 15, 2024 at 5:46 pm
January 15, 2024 at 5:49 pm #15186399

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

Here is the ticket. I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

January 15, 2024 at 6:07 pm
January 16, 2024 at 5:04 pm #15191464

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

I will have to escalate this further to our 2nd Tier Support for further investigation.

January 17, 2024 at 4:02 pm #15195916

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

This is a known issue and a fix will be available in the next update. In the meantime, I've applied a workaround by editing this file /woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php line 602

I changed from

$custom_fields            = $this->get_custom_field_values( $this->product_id, $custom_field );

to

$custom_fields            = $this->get_custom_field_values( $element_id, $custom_field );

Could you backup and try applying this fix on your production site and see if it works?

January 17, 2024 at 10:17 pm #15197321

jaredM-7

Yes, it worked. Thank you!