This thread is resolved. Here is a description of the problem and solution.
Problem: The client is using English (EN) as the main language and Bahasa Malaysia (MS) as the secondary language on their website. They have an Advanced Custom Fields (ACF) gallery image on a custom post type (CPT) that displays correctly in English. However, in the Bahasa Malaysia translation, the image IDs are not retrieved, and no images are displayed, even though other text custom fields are shown correctly. Solution: We found out that the issue was caused when the "Duplicate existing media for translated content" in Settings > Media is unchecked. After enabling this setting, the images are showing up correctly again. If the problem persists, it might be due to an outdated solution or a different cause. We highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue is still unresolved, please open a new support ticket with us.
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.
On my website, I'm using English (EN) as the main language and Bahasa Malaysia (MS) as the secondary.
#2. On a CPT, I have a ACF gallery image. I can get all the images ID correctly in the EN language in the single post, but in the MS language, I get no images. However, all other text custom fields can be shown correctly.
On my website, English (EN) is the primary language and Bahasa Malaysia (MS) is the secondary. I disabled media translation as I want the images to be shared across all languages.
I have a custom post type called "Theatre" as an example. The WPML translation settings that I used for this CPT is "Translatable but use translation if available or fallback".
In Theatre, there's a ACF gallery field. When I add in images into the gallery field for a Theatre post , the gallery shows up correctly in the primary language (Example: hidden link). But when the same post is in the secondary language (Example: hidden link), ONLY the gallery images doesn't show up at all. All other content for the post shows up correctly.
P/S: If I share live links here, can they be set to private?
Thanks for your update. I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Preferably to a test site where the problem has been replicated.
Your answer will be private, meaning only you and I can access it.
❌ Please backup your database and website ❌
✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.
✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.
There are no Theater posts that are translated to secondary at the moment (the client will handle that) but it needs to have a fallback so that other texts, such as the labels or headings, are using the secondary language.
I've tried using sample code directly from ACF's website for the gallery field, but it still doesn't show up on the MS page. The EN still works fine with the same code.
The gallery seems to work in the sandbox site. I'll try to dig up further on why this is so.
Also something I just recalled about the site is that the client had previously installed the Media translation, but I had it deactivated. Will that have any impact of whether the image loads correctly?
1) The sandbox site doesn't have Media Translation installed, so I don't think it's the cause of the issue.
2) Following these steps, Please check if the issue persists in a minimal environment.
1- Deactivate all the plugins except those active ones on the sandbox site.
2- Switch to your parent theme.
3- Create a new test template and translate it.
4- Compare the theme and WPML settings on both sites.
If the issue is gone, activate them one by one to see which one is causing an interaction issue.
❌ Please backup your database before performing the above test ❌
I've found out that the issue was caused when the "Duplicate existing media for translated content" in Settings > Media is unchecked. After enabling this setting, the images is showing up correctly again. "Duplicate" wording here is pretty misleading and probably should be reworded IMO.