Skip Navigation

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

Problem:
The featured images are not available on some translated pages.

Solution:
To fix this issue, please try the following steps:

1. Edit the post in the original language
2. Go to the Media attachments translation options
3. Enable the following options:
- Duplicate media attachments for translations
- Duplicate featured images for translations
4. Save the post and update the translation

0% of people find this useful.

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.

Our next available supporter will start replying to tickets in about 4.51 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 19 replies, has 3 voices.

Last updated by arnoP-3 1 year, 7 months ago.

Assisted by: Mohamed Sayed.

Author Posts
April 16, 2023 at 12:49 pm #13481609

Mohamed Sayed

Hi Arno,
Sorry for the late reply due to the weekend.

Take your time, I will be waiting for your updates.

I'm also checking with our devs again about how to get a list of those pages and will update you once I get their reply.

Regards,
Mohamed

April 17, 2023 at 10:25 pm #13490961

Mohamed Sayed

Hi Arno,
Thanks for your patience!

Could you please try the following steps?

1. Open your database using phpMyAdmin(or another database manager)
2. Go to the SQL tab and run the following query:

SELECT DISTINCT post_id FROM `wp_postmeta` WHERE (`meta_key` = '_wpml_media_duplicate' AND `meta_value` = '0') OR (`meta_key` = '_wpml_media_featured' AND `meta_value` = '0');

This will give you the list of post IDs where any of the two settings for the post are unchecked.

Regards,
Mohamed

April 18, 2023 at 12:37 pm #13495829

arnoP-3

Hi Mohamed,

Thank you, that query helps to find all posts. I modified it in order to only find the right post types and the posts in the default language, and to display post names too so I can easily find them.

SELECT DISTINCT wp_postmeta.post_id, wp_posts.post_name, wp_posts.post_type FROM wp_postmeta
JOIN wp_posts
ON wp_postmeta.post_id = wp_posts.ID
JOIN wp_icl_translations
ON wp_postmeta.post_id = wp_icl_translations.element_id
WHERE ((wp_postmeta.meta_key = '_wpml_media_duplicate' AND wp_postmeta.meta_value = '0') OR (wp_postmeta.meta_key = '_wpml_media_featured' AND wp_postmeta.meta_value = '0'))
AND (wp_icl_translations.language_code = 'en')
AND (
   (wp_posts.post_type = 'page')
OR (wp_posts.post_type = 'vendor')
);

Kind regards,
Arno

April 18, 2023 at 5:15 pm #13498493

Mohamed Sayed

Hi Arno,

I'm glad to hear that you managed to find the affected posts and thanks for sharing the modified query with us!

Please let us know if need any further assistance, we will be always happy to help.

Regards,
Mohamed

April 18, 2023 at 6:09 pm #13498841

arnoP-3

I guess we're done now. Thanks for your help Mohamed.