Skip to content Skip to sidebar

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

Problem:
The client is experiencing issues with images in an ACF field only displaying on English posts and not on Spanish posts, despite using the ACF WPML add-on.
Solution:
We found that the issue was due to the translation settings for the ACF Field Group. It is not recommended to set the translation preference for the 'acf-field-group' post type to Translatable as it creates separate field groups for each language, requiring manual configuration for each. To fix this, we set the ACF Field Group's translation preference to "Not Translatable" and deactivated the translated field group. We then set the translation preference for the `topic_featured_image` and `_topic_featured_image` meta fields to "Copy." After making a minor change and saving it via "Posts > Tag > Quick Edit," the featured image was successfully copied to the translated tag and displayed correctly on the frontend. For more details, please check this Errata.

If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. Additionally, we highly 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. For further assistance, please visit our support forum 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 21 replies, has 2 voices.

Last updated by Prosenjit Barman 1 year, 9 months ago.

Assisted by: Prosenjit Barman.

Author Posts
July 3, 2024 at 6:50 am #15880910

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hi!

Thank you for sharing the access information.

I have checked and am happy to inform you that the Featured images are now showing correctly in the Translated tag archive. Please check this screenshot: hidden link

The main reason for the issue is translating the Field group. It is not recommended to set the translation preference for the 'acf-field-group' post type to Translatable and translate the field groups. Doing so creates a separate field group and fields in each language, which will then require you to manually configure the field group for each language.

Please check this Errata for more information.

To resolve the issue, I set the translation preference for the ACF Field Group to "Not Translatable" and deactivated the translated field group. Next, I set the translation preference for the `topic_featured_image` and `_topic_featured_image` meta fields to "Copy." After that, I navigated to "Posts > Tag" and clicked the quick edit button below the default tag. I made a minor change and saved it. This action copied the featured image to the translated tag, and it started appearing correctly on the frontend.

I hope it helps. feel free to let me know if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

July 8, 2024 at 2:52 pm #15914141

jonathanS-28

Thank you Prosenjit. We're getting closer but there is still a problem. The screenshot you provided corresponds with what I'm seeing on the site: the featured image for the tag has been translated and appears on the tag page in the back end and on the front end on the Spanish version of the front-facing page. However there are other tags that only appear on the the translation of the tag page in the back end but aren't displaying on the front end. So the first part of your descriptions seems to work: I made a small change and saved the tag in English, after which the image was translated to the Spanish side. But even after waiting and clearing both server and local browser caches none of the other featured images are displaying on the front end, even when they have been translated. What do you suggest from here?

July 9, 2024 at 5:15 am #15917584

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hi There,
Thank you for the update.

I have checked and noticed the issue. It appears that the custom field data is not being saved in the database, even though the data is being copied to the translated tag. This type of problem can occur due to misconfiguration of the ACF field, which has happened before.

For now, please open the translated tag in the editor and save it without making any changes. This will ensure that the custom field information is properly saved in the database and will start to appear correctly on the frontend. I have updated the translations for two tags, and the images are now displaying correctly with them.

I hope this helps. If you need any further assistance, please don't hesitate to let me know. I'll be happy to assist.

Best regards,
Prosenjit

July 9, 2024 at 8:44 pm #15923257

jonathanS-28

Excellent, that worked. Thank you so much for the help with this Prosenjit, much appreciated. One last question: Should I expect to have to this last step, of saving on the Spanish side, going forward from here, say when a featured image is added to a tag that previously didn't have one or if the featured image changes?

July 10, 2024 at 3:12 am #15924638

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hi!

Thank you for the update. I'm glad it worked out!

To answer your question, ideally, you shouldn't have to repeat this step for the new tags or each time you add or change a featured image. Once the custom field configuration is properly set, the data should be saved correctly across all translations.

However, if you do encounter this issue again, it's a good idea to open the translated tag in the editor and save it. This will ensure the custom field data is correctly saved in the database and the images display properly on the frontend.

If you have any more questions or need further assistance, feel free to ask! I'll be happy to help.

Best regards,
Prosenjit

July 10, 2024 at 1:08 pm #15928204

jonathanS-28

Should I reconfigure the ACF field in any way to ensure it's set up correctly?

July 11, 2024 at 4:09 am #15931697

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hi!

The ACF fields are set up correctly now. However, since the tags with custom fields were created before the fields were configured correctly, the field data are not being saved properly for the translated tags. Therefore, it's necessary to save the translated tags to ensure the custom field information is properly saved for each one. If you create a new tag with an image and translate it, the data should be added properly to the translated tag, and it might not be necessary to resave the translated tag to display the custom field data.

I hope this clarifies things. If you have any other questions or need further clarification, please feel free to ask. I'll be happy to help.

Best regards,
Prosenjit

July 15, 2024 at 1:52 pm #15954848

jonathanS-28

Thank you Prosenjit. Very helpful support!