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.

Tagged: 

This topic contains 3 replies, has 0 voices.

Last updated by arianeW 5 months, 3 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
December 4, 2024 at 10:09 am #16475290

arianeW

Background of the issue:
I'm using WPML to translate my site from German to English. I'm trying to translate a custom field that uses a WYSIWYG editor, but WPML cannot detect it. I've tried using different themes, deactivating all plugins, and I have the latest versions of WPML, ACF, and WP core. The custom field is inside a repeater in an ACF block. When I change the field from WYSIWYG editor to textarea, it works.

Symptoms:
WPML cannot detect the custom field that uses a WYSIWYG editor. It works when changed to a textarea.

Questions:
Why can't WPML detect the custom field with a WYSIWYG editor?
Is there a known issue with WPML translating HTML in custom fields?

December 5, 2024 at 7:30 am #16479449

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thanks for contacting WPML Support.

I understand the issue you’re experiencing. If the translation preference for the WYSIWYG field is set to Copy or Translate, its contents should appear in the translation editor for translation. Please note that no compatibility issues have been reported to us for the WYSIWYG field of ACF during translation.

Could you please check what is the translation setting for that field? if you can share a screenshot of that WYSIWYG field that clearly shows the name of the field, I would be able to check and suggest what to do next.

Additionally, please also check if the solution mentioned in the following response helps to solve the issue.

- https://wpml.org/forums/topic/split-custom-filed-is-not-showing-as-wysiwyg-in-wpml-classic-editor/

Please check and let me know the update. I'll be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

December 5, 2024 at 10:17 am #16480828

arianeW

Hi Prosenjit,

Thanks for the reply. I've tried out everything, 'Copy Once', 'Copy' and 'Translate' but unfortunately nothing changed. I also saw that link and tried it but had no luck as well.

This is the code I tried:
<wpml-config>
<custom-fields>
<custom-field action="translate" style="visual">text_blocks_*</custom-field>
</custom-fields>
</wpml-config>

Also tried changing 'text_blocks_*' to 'text-block' (my ACF block name) but that didn't take as well.

However, I came upon a new finding: If I have 2 sets on 'text-block' block component on the same page, then the second one will recognize the WYSIWYG editor field.. but if I use only one 'text-block' component on the page then the WYSIWYG editor field won't be recognized as seen on the images.. it's very weird. As I already mentioned, I tried turning off all the plugins expect ACF and WPML of course, also tried on another theme and still nothing..

I also tried using flexible content and that works but I'd like to know why the WYSIWYG field inside repeater field doesn't work. Let me know if you need more information from me. Tnx

Screenshot 2024-12-05 110538.png
Screenshot 2024-12-05 110615.png
December 6, 2024 at 4:06 am #16484449

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thank you for the update and for sharing more details about the issue.

Sometimes, when fields have the same name, their data may not appear in the translation editor. Could you please navigate to ACF > Field Groups, open the field group containing the repeater and WYSIWYG fields, and ensure that each field within the group has a unique name?

If the issue persists, we need to determine whether it is specific to your site or a broader problem. I kindly request you replicate the issue on our sandbox site provided below.

- hidden link

The WPML plugin and its addons are pre-installed on the sandbox. Please complete any remaining setup steps. Then, install the ACF plugin and try to replicate the issue as it occurs on the main site.

If you encounter the same issue on the sandbox site, let me know. I will review it and advise you on the next steps. if needed, I will also escalate the issue to the 2nd tier team for further investigation.

The main purpose of using the sandbox site is to isolate the issue in a simplified environment, removing any server or external factors that could be affecting the behavior on your main site.

Please try and let me know the update. I'll be more than happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

December 13, 2024 at 9:21 am #16510548

arianeW

Hi Prosenjit,

Thank you for your answer. The problem was with the field's name. I used the same name across different custom fields. Using a unique name fixed the problem.

Thanks for your help.