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.

This topic contains 1 reply, has 2 voices.

Last updated by Alejandro 10 months, 3 weeks ago.

Assigned support staff: Alejandro.

Author Posts
July 8, 2019 at 8:36 am #4160053


Hi guys!

I've found you conversation as I have same issue. I have several Pods custom post types. I purchased WPML and configured all custom fields as instructed in WPML documentation. But when I create new translation for post with custom image field (e.g. Person with Photo), photo is not copied, even after saving new translation (despite that it shows message at the top that a list of 'Copy' behaviour fields will be populated after saving). I have set custom field 'photo' to 'Copy' behaviour.

I tried also Copy from original language option, but image fields (also relationship and actually other pods custom fields) are not copied. I've spent many hours now to find the solution but this conversation is the closest I could get - a compatibility issue.

So is the only thing we can do is rely on Pods team to solve this? Or WPML team can do anything about this? Is there perhaps some workaround for admin UI so my client don't have to attach same image for each translation?

July 8, 2019 at 8:48 am #4160211


Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hi, i split the ticket just so we can keep troubleshooting this issue with you.

In the last thread we sort of hit a dead end because in order to fix this problem we need to replicate it and we got stuck, so i would greatly appreciate your help on this one.

Our compatibility team suggested that you add this code where you have the gallery code (i mean, in the template, where you have the line of code that reads the gallery images)

apply_filters( 'wpml_object_id', int $element_id, string $element_type, bool $return_original_if_missing, mixed $ulanguage_code )

In there you have to replace the different parameters with the real ones, so "$element_id" would be either the ID or the function that returns the element ID.

"$element_type" would be the element type

in "$return_original_if_missing" you could set "TRUE"

for "$ulanguage_code" you could use this hook to dynamically get the current language:

Try it out and let me know how it goes!

The topic ‘[Closed] Split: Images from media gallery not showing in all languages’ is closed to new replies.