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.64 hours from now. Thank you for your understanding.
Tagged: Exception
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 5, 2023 at 10:48 am #13409261 | |
arnoP-3 |
Hello, A translator translated my page hidden link (English) to hidden link (German). That worked fine. The English page already had a featured image assigned to it. The featured image was already translated into German. In most cases, the featured image is automatically assigned to the translated page. But this is the second page where that didn't happen. If I look into the WordPress pages overview and switch to German via the top menu, these two pages do not have a featured image, while the others have. For one page, I manually assigned them to the German translation, and now it's fine. But that shouldn't be necessary. Why would this fail for two pages while it works fine for the rest? Kind regards, |
April 5, 2023 at 11:10 am #13409595 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello Arno, Thanks for contacting WPML forums support. Could you please check the following options are checked: 1- Edit the post in the original language Kind regards, |
April 5, 2023 at 12:30 pm #13410233 | |
arnoP-3 |
Hi Drazen, Those options are not selected for that particular page. I also checked some random other pages and most have those options selected, but some do not. As for the generic settings in WPML - Settings - Media Translation, these options are enabled: 1) I'm not sure why this setting hasn't been synced to all pages. We don't disable it. What if we had the generic settings disabled initially? (I'm not sure if that's the case). Would the setting not be applied to all existing pages once changed? 2) I did change the settings for that one English page now. The image was still missing. Then I opened the Advanced Translation Editor, changed nothing, clicked Complete. That did it. 3) How can I make sure this is enabled for all pages site-wide? Kind regards, |
April 5, 2023 at 5:57 pm #13413239 | |
Mohamed Sayed |
Hi Arno, Could you please try the following steps and let me know if that helps? 1. Go to WPML > Settings > Media Translation Regards, |
April 7, 2023 at 10:12 am #13426421 | |
arnoP-3 |
Hi Mohamed, As for step 1-3: I tested this on a staging copy. Those options were already checked and I clicked the Start button. It started to translate and duplicate 16000 images that were not translated on purpose: they're imported via WP All Import and we do not want all those duplicates. These are not the images used as featured images anyway. So, this is not something I can do on the live site. It's stuck in a loop by the way: it's now going through those images for the 3rd time and it takes a very long time. 4. For the same reason, I can't enable the option "When uploading media to the Media library, make it available in all languages". I did try to click Apply while that option was disabled and the other enabled (effectively making no changes). I then re-checked a page that had "Duplicate uploaded media to translations" and "Duplicate featured image to translations" disabled. It now has only the first option enabled. This doesn't make sense? 5. This already works fine on the live site without doing any of the above. I'm not sure what to do. I suppose I can simply wait until there's another page with a missing featured image, and then set those options manually in the page settings, open the ATE, change nothing and re-save the translation. It feels safer than any of the above options which all behave weird, to be honest. But I'd prefer a more efficient way 🙂 Kind regards, |
April 7, 2023 at 11:01 am #13426731 | |
arnoP-3 |
I said: "I then re-checked a page that had "Duplicate uploaded media to translations" and "Duplicate featured image to translations" disabled. It now has only the first option enabled. This doesn't make sense?" I checked again 30 minutes later, and now it does have both options enabled. So perhaps I do just need to click Apply (and not change any settings), and then be patient. |
April 9, 2023 at 11:50 am #13433947 | |
Mohamed Sayed |
Hi Arno, I tested this on a clean installation and it works as expected, please check here hidden link As you can see in the recording, the options are enabled by default and they follow the changes I made for the new content in the WPML settings pages. So it could be a conflict issue causing this behavior on your side, please try the following steps after creating a full database and website backup: For the existing translations, please use the same steps you used to fix the English page before: - Edit the page in the default language For the new content, please enable the two options under WPML > Settings > Media Translation > How to handle media for new content > Click apply Then clear the site cache and check if the options are enabled for new content. If that didn't help and you still see the options unchecked, please check if the issue persists in a minimal environment by following these steps: - Deactivate all the plugins that are not related to WPML. ❌ Please backup your database and website before performing the above test ❌ Let me know please how that goes. Regards, |
April 10, 2023 at 7:42 am #13436257 | |
arnoP-3 |
Hi Mohamed, Your video demo works for me as well. I think I had the options disabled at some point. Then I enabled them a few months ago. Pages created before that still don't have the options set. Clicking the Apply button (without changing settings because they are fine now) does not seem to do anything for existing pages when I tried this on my actual site (non staging). So I either need a way to make that Apply button work, or I need a way to get a list of all pages which have the options disabled, so I can manually correct them. Kind regards, |
April 10, 2023 at 2:15 pm #13437639 | |
Mohamed Sayed |
Hi Arno, The "Apply" button works for the options that handle the media for new content. I'm checking with our developers if it's possible to get the list of pages where the options are disabled and will update you once I get their reply. |
April 11, 2023 at 9:07 am #13443209 | |
Mohamed Sayed |
Hi Arno, Could you please create a full backup then try this first? 1. Go to WPML > Settings > Media Translation |
April 11, 2023 at 5:50 pm #13449093 | |
arnoP-3 |
Hi Mohamed, I attached my current settings. The setting you're suggesting to enable is not in the group that seems to be associated with the Start button. Just to double-check: do you want me to enable that setting and disable the 7 other settings? And then click Start? And then enable again what I had enabled originally and hit Start again? Or Apply? Sorry, it's just not very clear what these settings and buttons are supposed to do exactly. |
April 11, 2023 at 8:28 pm #13450263 | |
Mohamed Sayed |
Hi Arno, The first group of options with the "Start" button are applied to the existing translations, and this is where the issue happens. Please check the attached screenshot and make sure that the option "Duplicate the featured images for translated content" is the only one enabled then click the "Start" button. The other group of options with the "Apply" button under the "How to handle media for new content" title, affects the new content you'll create. I also created a recording here showing how the settings should be before running the process: hidden link Regards, |
April 12, 2023 at 6:06 am #13452131 | |
arnoP-3 |
Hi Mohamed, Thanks, I understand. I tried that on a staging copy. The process took 30 minutes to complete. Before I started, one of the pages had both these options disabled: Afterward, option 2 was enabled. I will try again on a fresh staging copy. I need to make sure this does not duplicate all images in the media library, because the majority does not need to be translated. Kind regards, |
April 12, 2023 at 9:44 am #13453979 | |
Mohamed Sayed |
Hi Arno, Great, I will be waiting for your feedback. |
April 14, 2023 at 6:16 am #13470747 | |
arnoP-3 |
Hi Mohamed, Just letting you know that it may take a little while because I can only test this again once my other issue (https://wpml.org/forums/topic/translated-links-ignored-in-the-frontend/) is solved. Meanwhile, if you do have a way to get a list of pages where the options are not set, please let me know. Fixing this manually page by page works fine as long as there are not too many. Kind regards, |