This thread is resolved. Here is a description of the problem and solution.
Problem:
Hello, I am using the Enfold theme updated to the latest version. When I try to create a gallery with the advanced layout editor, I select the photos to insert. However, when I save the page, I see different images compared to the ones I have chosen. I noticed that this has been happening since we installed WPML Media Translation. How can I resolve this? Thank you.
Solution:
Meta Information was missing from the images and that causes the issue. Please check the solution here: https://wpml.org/forums/topic/different-images-are-shown/#post-14187665
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: Exception
This topic contains 10 replies, has 2 voices.
Last updated by Prosenjit Barman 1 year, 5 months ago.
Assisted by: Prosenjit Barman.
Author | Posts |
---|---|
August 3, 2023 at 7:55 am #14146487 | |
marziaP |
Hello, I am using the Enfold theme updated to the latest version. When I try to create a gallery with the advanced layout editor, I select the photos to insert. However, when I save the page, I see different images compared to the ones I have chosen. I noticed that this has been happening since we installed WPML Media Translation. How can I resolve this? Thank you. |
August 4, 2023 at 8:48 am #14153781 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, I understood the issue you're having. Can you please share the link to the page where you're having the issue? I will check and let you know what to do next. Looking forward to your response. Best Regards, |
August 4, 2023 at 9:28 am #14154021 | |
marziaP |
Hi Prosenjit, |
August 7, 2023 at 8:00 am #14161703 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hi There, Thanks for sharing the link. Could you please check what happens if you deactivate other plugins except for WPML and its add-ons? After deactivating the plugins, add the images again and then check. If the images appear properly after that, it will mean that the issue was happening due to a conflict between the plugin. Now, start activating the plugins one by one and after activating each, continue to check if the issue reappears or not. In this way, you'll be able to pinpoint the plugin that is causing the issue. Please let me know how it goes. If you need further assistance on this, I will be happy to help. Best Regards, |
August 7, 2023 at 8:15 am #14161835 | |
marziaP |
Hi Prosenjit, I've done this test. Even with all plugin deactivated (except WPML) the problem persists. If I turn all the WPML off plugins, it works properly, so It's definately WPML related problem. Can you check it? Thanks |
August 8, 2023 at 3:42 am #14166527 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hi There, As the issue persists even after running the conflict test, a closer inspection will require to understand the root cause of the issue. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it. Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you. IMPORTANT Looking forward to your response. Best Regards, |
August 9, 2023 at 7:27 am #14173091 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, I inspected the issue properly and found that whenever I try to add an image in the Gallery, an error from media library scripts appears in the Console log. Please check this screenshot(hidden link) for a better understanding. I also tried to replicate the issue in my development environment and can confirm that everything works fine even with the WPML plugin. However, I noticed that you're currently using PHP 8.2 on your site. As this version is not fully supported with the WordPress installed on your site, would you please switch to PHP 7.4 and check if that makes any difference? Check this link to know more about the supported PHP version: https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/ Let me know the update. I will be happy to help if you need further assistance in this matter. Best regards, |
August 9, 2023 at 7:58 am #14173219 | |
marziaP |
Hi Prosenjit, thanks for your support. I switched to PHP 7.4 but the issue is still there. |
August 10, 2023 at 7:47 am #14179841 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, I don't think that the regenerating thumbnail will work in this case as the issue is happening due to something else. I conducted another thorough inspection and found that the issue is only happening when you're in the Italian language. When I create a post manually in English language and then try to add the images, I didn't encounter any issues. Please check this video(hidden link) for a better understanding. I also checked by configuring the Italian language as the default language of my site but couldn't be able to trace any issues. The configuration made in the WPML settings is also correct. Since the issue is only happening on your end, I would like to ask your permission to create a copy of your site so that I can deploy that on my development environment and escalate the issue to the 2nd tier team if required. I will install the All-in-one Migration plugin to create the package. Please let me know if you're okay with this process. Looking forward to your response and appreciate your patience and kind cooperation in this matter. Best Regards, |
August 10, 2023 at 8:18 am #14180009 | |
marziaP |
Ok, you can proceed. |
August 11, 2023 at 9:55 am #14187665 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, Upon checking further, I've successfully been able to trace what actually causing the issue. When you try to insert an image, the `avia-media.js` script will try to fetch the thumbnail of that image. The information about the thumbnail is stored in the meta information of each image. Now, while checking the images, I noticed that the meta information is not attached to most of the images on your site and as a result, the 'avia-media.js' script failed to verify if the thumbnail is attached with the images or not. Therefore, it can't add the image to the Gallery. To check the Meta information, I installed a plugin named "Media Meta & Force Regenerate". If you go to the "Media section" of WordPress and check the "Metadata" column, you will notice that the data shows "NONE" for most of the images. But, if you search this specific image("associazioni.png"), you'll notice that the Metadata is available for that image. Also, if you try to add this image to the Avia Gallery, that image will be inserted without any issues. This issue usually happens if the site is migrated or the contents have been imported later. However, I rebuild the metadata for media items that are missing and that solves the issue. I followed the guidelines mentioned here to rebuild the metadata: https://wordpress.stackexchange.com/questions/330174/regenerate-missing-wp-attachment-metadata Please check now and you should be able to add images to the Gallery. Let me know if there is anything else you need help with. I will be happy to assist. Best regards, |
August 11, 2023 at 10:07 am #14187691 | |
marziaP |
Hi Prosenjit, it works! Thanks a lot for your cooperation! Regards. |