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.
Tagged: Known issue
This topic contains 3 replies, has 0 voices.
Last updated by ghledisC 1 day, 1 hour ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
January 31, 2025 at 10:57 am #16655023 | |
ghledisC |
I am trying to have a one-click translation solution using WPML. The issue occurs when translating a WYSIWYG Editor ACF field. The field name is 'description', and it is set to Translate in the settings. Previously, it was set to 'Don't translate'. The 'description' field didn't use to go through WPML previously. It was translated manually in the WordPress editor. A WYSIWYG Editor Advanced Custom Field does not get translated. After sending the post to Automatic Translation, I have to modify the English version, save it, resend the translation, and then it translates properly. Before starting to use Automatic Translation, I had to update the field's setting from Don't translate to translate. Saving this setting started an update cycle. The process stopped once or twice with a PHP error: 'PHP Warning: Attempt to read property "post_content" on null' and 'PHP Warning: Attempt to read property "post_type" on null' in wpml-pro-translation.class.php on lines 420 and 421. I handled it by resaving the settings, which seemed to debug it until all posts were updated. Why is the WYSIWYG Editor ACF field not being translated automatically? |
February 1, 2025 at 5:12 pm #16658676 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Could you please try to apply the workaround from this errata: Alternative: Edit the original field on the original content, save the page and let the translation run through again. Best regards |
February 3, 2025 at 9:23 am #16661783 | |
ghledisC |
First of all I feel like you didn't fully read what I wrote, because in my description of my problem I stated that I already found the workaround of updating the english, also that I am using Advanced Custom Fields. So your answer was not very helpful at all. I tried to use the piece of code to be inserted in the functions.php and it didn't do anything. The situation is still the same. Posts that in the past were translated with the field set to Don't translate, still get translated the same way. So the only solution that works is to manually update the source language post before it is sent to translation. Are you aware if an automatic update of the machine (meaning looping through all past posts and triggering an update) would handle this or not? Or is there a hook that would update WPML settings in past posts, beside the piece of code that I just tried? |
February 3, 2025 at 2:27 pm #16663336 | |
ghledisC |
I resolved my problem by looping through all the posts I have and updating the post_modified and post_modified_gmt by adding 1 second. So this set all my posts to be updated and the changed field settings are now recognized. |