Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Long Nguyen 1 year, 11 months ago.

Assisted by: Long Nguyen.

Author Posts
November 7, 2023 at 9:31 am

vithleemG

Salient cascading images not translating in media translation

November 9, 2023 at 4:15 am #14761981

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Vithleem,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

I see you've already added the custom XML configuration code to register the shortcode "nectar_cascading_images" and image url attributes for translation.
Then simply, you can go to WPML > String Translation > Search for the image ID and add the translation image ID to display the translation image in the frontend. Please check attached screenshots.

For further investigation, please help us to replicate the issue on a clean installation of WordPress. You can login directly to the admin area with this link
hidden link

Kindly follow the steps below:

- Don’t restore your site there.
- Install the Salient theme and its addon plugins.
- Try to replicate the issue.
- Then let me know the steps to replicate it.

You can also contact Salient support and ask them if they are aware of this issue.

Look forward to your reply.
Thanks

Screenshot 2023-11-09 at 11.05.31.png
String Translation ‹ Η ΕΚΘΕΣΗ MEAT : DAIRY : FROZEN — WordPress 2023-11-09 11-03-56.png
November 10, 2023 at 12:44 pm #14776559

vithleemG

Hello,

Bellow my guidelines based on your request on how to replicate the error.

- Don’t restore your site there.
Ok
- Install the Salient theme and its addon plugins.
Ok
- Try to replicate the issue.
Done
- Then let me know the steps to replicate it.
I have created a new page.
I have added the element from salient with the name: "Cascading images".
I have uploaded 2 images inside.
I went to "Media translation" -> Found the image and uploaded the one that should appear on the translated version of the site.
Then i run the scan of the page
The image does not appear on the translated page.

Would like to inform you also that I have not transferred all the settings from my site. If you have any export/import tools available feel free to take the settings from the live site.

Let me know if you need any more information.

November 13, 2023 at 1:48 am #14785183

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

There is a workaround to fix this issue, please follow steps below and let me know if it helps:

- Edit the file /wp-content/plugins/salient-core/includes/vc_templates/nectar_cascading_images.php

- Around line 157-159, replace the code:

	if( !empty($cascading_attrs['image_'.$i.'_url']) ) {

		if( !preg_match('/^\d+$/',$cascading_attrs['image_'.$i.'_url']) ) {

with this one

	if( !empty($cascading_attrs['image_'.$i.'_url']) ) {
		$cascading_attrs['image_'.$i.'_url'] = apply_filters('wpml_object_id', $cascading_attrs['image_'.$i.'_url'], 'attachment');
		if( !preg_match('/^\d+$/',$cascading_attrs['image_'.$i.'_url']) ) {

❌ IMPORTANT: Please backup your database and website before proceeding ❌

Refer documentation https://wpml.org/wpml-hook/wpml_object_id/

If it works, please also help us report this issue to the theme author to include the fix on their side.

Look forward to your reply.
Thanks

November 17, 2023 at 1:33 pm #14863129

vithleemG

Thank you for the reply. I will try to add the following code that you provided and I will let you know. Can you provide this also to the team on the salient theme? So they can update this on their end also.

Best Regards

November 20, 2023 at 1:48 am #14872437

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Yes, please confirm that it works on your site. Then I will report this issue to our Compatibility team to contact the theme author and ask them to include the fix on their side.

Look forward to your reply.
Thanks

The topic ‘[Closed] Salient cascading images not translating in media translation’ is closed to new replies.