Skip Navigation

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

Problem:
You are experiencing an issue where the carousel in the French and German versions of your website displays the second photo twice instead of showing both photos individually. You are also having trouble using WPML's Media Translation feature to translate photos for different language versions.
Solution:
First, to avoid affecting your live site, we have set up a sandbox environment for you to replicate the issue. Please install the necessary theme and plugins there.

If the issue persists, you can try the following workaround:

1. Edit the file at

.../wp-content/themes/woodmart/inc/integrations/elementor/elements/class-images-gallery.php

.
2. Locate line 552.
3. Replace the existing code:

$image_url = woodmart_otf_get_image_url( $image['id'], $settings['ids_size'], $settings['ids_custom_dimension'] );

with:

$image['id'] = apply_filters( 'wpml_object_id', $image['id'], 'attachment');<br />$image_url = woodmart_otf_get_image_url( $image['id'], $settings['ids_size'], $settings['ids_custom_dimension'] );

If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins.

For further assistance, please contact us through the WPML support forum.

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: 

This topic contains 8 replies, has 2 voices.

Last updated by Kor 2 months, 2 weeks ago.

Assisted by: Kor.

Author Posts
August 13, 2024 at 11:53 pm #16068301

davoodB

Background of the issue:
I’m experiencing an issue with the Woodmart Image Gallery element in the mobile version of my website. In the English version, I’ve set up a carousel using Elementor that displays two photos correctly. However, in the French and German versions, the carousel displays the second photo twice instead of showing both photos individually. I’ve checked the media library, and both photos are available in all three languages (English, French, and German), indicating that the media duplicated correctly. I also expected to translate the photos using WPML's Media Translation feature, but this isn’t working as expected.

Symptoms:
In the French and German versions, the carousel displays the second photo twice instead of showing both photos individually.

Questions:
How can I resolve the issue where the carousel in the French and German versions displays the second photo twice instead of showing both photos individually?
How can I properly utilize WPML's Media Translation feature to translate photos for different language versions, as this does not seem to be working as expected?

August 14, 2024 at 8:19 am #16069167

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for reaching us. I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

August 14, 2024 at 12:50 pm #16070621

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for your response.

I believe there may be compatibility issues with the carousel slider. To investigate further and to prevent causing downtimes to your production Website, I've set up a sandbox site at hidden link . Could you please install the necessary theme and plugins and replicate the issue there?

Once we've replicated the issue, we can escalate it to our second-tier support if additional assistance is needed. I've already installed and activated the WPML plugins. Please let me know how it goes.

August 14, 2024 at 1:29 pm #16070783

davoodB

Hi Kor,

Thank you for setting up the sandbox site. I have installed the necessary theme and plugins and successfully replicated the issue in the sandbox environment.

The default and origin language is French. In the English and German versions, only one of the two photos is displayed. Additionally, the media translation does not work as expected.

Please let me know the next steps or if there’s anything else you need from my side.

Thank you for your assistance.

Best regards,
Dave

Screenshot 2024-08-14 at 15.23.55.png
August 14, 2024 at 3:52 pm #16071695

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Please allow me to escalate this to our 2nd Tier Support for further investigation. I will come back to you once I've feedback.

August 14, 2024 at 5:34 pm #16072054

davoodB

Hi Kor,

Thanks for the update. I appreciate you escalating this to the 2nd Tier Support and look forward to your feedback.

Best regards,
Dave

August 19, 2024 at 12:11 pm #16083327

davoodB

Hi Kor,

Just checking in on the status of the issue escalated to 2nd Tier Support. Any updates?

Thanks for your help.

Best regards,
Dave

August 19, 2024 at 1:36 pm #16083958

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

The report has reached our compatibility team. But I have no updates yet. Sorry. I will come back to you once I hear from them.

August 26, 2024 at 4:30 pm #16106110

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

I have feedback and try the workaround provided below. Please let me know if this works.

Edit .../wp-content/themes/woodmart/inc/integrations/elementor/elements/class-images-gallery.php file.

Look for line 552.

Replace:

$image_url = woodmart_otf_get_image_url( $image['id'], $settings['ids_size'], $settings['ids_custom_dimension'] );

With:

$image['id'] = apply_filters( 'wpml_object_id', $image['id'], 'attachment');
					$image_url = woodmart_otf_get_image_url( $image['id'], $settings['ids_size'], $settings['ids_custom_dimension'] );
August 29, 2024 at 7:29 pm #16121786

davoodB

Hi Kor,

Thank you for the workaround. I tried it, and it does resolve the issue when there’s only one photo in the image gallery. However, when I select two or more photos, it still repeats some of the photos.

Given this, I’ve decided to switch to using the Elementor carousel instead of the Woodmart Image Gallery element.

Thanks for your support.

Best regards,
Dave