Skip Navigation

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

Problem:

The client is developing a site and trying to translate several pods with various fields using WPML. They can only translate text fields and the WYSIWYG editor field, but not checkboxes or other fields. Despite setting fields as "translatable" or "copy once", checkboxes and option fields are not showing on the translated product page.

Solution:

1) Ensure that the fields are not set as COPY in WPML > Settings > Custom Fields Translation. WPML needs stored data for the custom field to detect it.
2) There are known limitations with translating PODS checkboxes and option field labels and values. Our compatibility team is working on a workaround.
3) For immediate relief, follow these steps:

- Visit WPML > Settings > Post Types Translation and set *Translatable - only show translated items* for Pod Templates, Pods, Pod Groups, and Pod Fields.

- In WPML > Settings > Custom Fields Translation, set *Don't translate* for fields like _pods_application_method, _pods_curing, and _pods_standards_complied_with.

- Set *Translate* for fields like application_method, curing, and standards_complied_with.

- Add the following code in the

template-parts/content/content-single.php

file:

<div align='center'>
    <?php echo "<br />".pods_field_display( 'application_method' ); ?>
    <?php echo "<br />".pods_field_display( 'curing' ); ?>
    <?php echo "<br />".pods_field_display( 'standards_complied_with' ); ?>
</div>

4) Update the post in the original language and its translation.

If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.

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

Last updated by Bigul 2 months, 2 weeks ago.

Assisted by: Bigul.

Author Posts
November 29, 2024 at 3:48 am #16457443

philippF-8

Dear Bigul,

I tried to use this solution in your sandbox and experienced this issue:
- for the same product as in your proof of concept, I added more selections under "application method" (01.png)
- clicked FR flag to translate
- new selections do not show up in ATE (03.png)
- new selections do not show on FR page (02.png)

It seems not a workable solution.

Best,
Philipp

WMPL sandbox issue 03.png
WMPL sandbox issue 02.png
WMPL sandbox issue 01.png
November 29, 2024 at 7:44 am #16457949

Bigul
Supporter

Languages: English (English )

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

Hi Philipp,

Thank you for the updates. This may be a sync issue. After following the steps, I am getting the expected results. Please make sure the translation is complete (pencil icon) before updating the original language post.

1) Complete the translation of the post (resave, because the translation status of the post was in progress mode)

2) Update the Post in the original language after a minor edit in the contents to refresh the translation settings

Please translate the values and make sure they work as expected. Refer to the attached images for more details

--
Thanks!

Bigul

2024-11-29_13h01_19.png
2024-11-29_12h37_19.png
December 5, 2024 at 11:20 am #16481071
philippF-8

Dear Bigul,

So far we know that the problem happens only with a certain type of fields (relationship fields with multiple selections)

Your example didn't use an elementor post template as in our case, so it is of limited use but I've managed to setup a new elementor template and new pods with multi-selection fields and it seems to work in different languages:
EN: hidden link
DE: hidden link

The solution was not to use elementor post meta widget but directly add pods shortcode to a simple text or html field (no php insert required).

However, I cannot replicate this success on the actual Elpeguard product groups. The field settings for the relationship fields are the same as in the successful test pods, so it must have something to do with the WPML settings.

Please have a look and if you can, let me know why this works for the "Aa" CPT and not for the "ELPEGUARD" CPT. The WPML account is still open on this test site and a backup has been made.

Thanks,
Philipp

December 5, 2024 at 3:51 pm #16482711

Bigul
Supporter

Languages: English (English )

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

Hi Philipp,

Thank you for the feedback. Just make sure the Pods fields are not showing translation when using the Elementor *Post Info* widget, am I correct? Please confirm.

--
Thanks!

Bigul

December 6, 2024 at 2:47 am #16484340

philippF-8

Hi Bigul,

yes, that's correct but this is not a problem -- I'm happy to use the pods shortcode instead but it only works on the new test products:
EN: hidden link
DE: hidden link

But not on the actual product (ELPEGUARD) and I'd like to understand why to be able to fix the real product pods. The field settings are the same for both pods.

Best,
Philipp

December 6, 2024 at 11:55 am #16485941

Bigul
Supporter

Languages: English (English )

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

Hi Philipp,

Thank you for the updates. It looks like a compatibility issue with the Elementor *Post Info* widget. So I have created a new ticket for easy follow-up and will get back to you soon. Please wait.

--
Thanks!

Bigul

December 9, 2024 at 7:10 am #16491168

philippF-8

Dear Bigul,
as I wrote I'm happy to bypass the elementor post widget and use the pods shortcodes which are working in the test scenario.
I would not like to make this more complex than necessary.
Best,
Philipp

December 9, 2024 at 2:01 pm #16493509

Bigul
Supporter

Languages: English (English )

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

Hi Philipp,

Thank you for your feedback. I requested you to replicate the issue on the sandbox site as it can be beneficial for you in the future, especially if you decide to proceed with the Post Info widget. Additionally, it will help in debugging and resolving the compatibility issue more efficiently.

--
Thanks!

Bigul

December 11, 2024 at 7:48 am #16501858
philippF-8

Dear Bigul,
I've recreated the post template and populated 4 products in the sandbox. The EN works as expected, the FR throws a critical error.
Best,
Philipp

New threads created by Bigul and linked to this one are listed below:

https://wpml.org/forums/topic/translated-posts-shows-fatal-error/

December 11, 2024 at 2:45 pm #16504082

Bigul
Supporter

Languages: English (English )

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

Hi Philipp,

Thank you for your updates. I have created a new ticket for the fatal error, and will get back to you soon on it.

--
Thanks!

Bigul