Skip Navigation

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.

This topic contains 21 replies, has 2 voices.

Last updated by viktorB-10 3 months, 1 week ago.

Assigned support staff: Andreas W..

Author Posts
November 14, 2019 at 10:17 pm #4950563

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

My apologies, but I have to admit that sadly I am not able to provide any answers to your questions.

I am consulting our compatibility team and will get back to you once I received more feedback.

Thank you for your patience.

Kind regards
Andreas

November 16, 2019 at 5:25 am #4957429

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

If I understand you right, you are referring to attributes used in ux_builder shortcodes, correct? Did you already consult the Flatsome Support about that?

Are there still elements that are not translatable?

Kind regards
Andreas

November 22, 2019 at 1:58 pm #4998513

viktorB-10

Hey Andreas!

Yes i guess it's a wpml related issue in terms that the Flatsome template code for the ux_banner element could/should maybe improved to not having the chosen (usually quite important) image file as a css 'background:' element, but as a child img element (which can output alt attribute, etc. ), or smt equally semantic and seo friendly.
The other ux_elements are kinda okay. They do well in terms of Alt 'tag' output.

However the image filename translation doesn't seem to work at any ux_elements (on the way they work at posts and products nicely).

So i would say it's wpml related by this way.

Best regards,
Wiktor

November 22, 2019 at 10:47 pm #5002115

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for your message.

As our test install has expired in the meantime do you think it might be possible that you install the theme again here to visualize and recreate the issue with our latest plugin versions?

One-Click Login:hidden link

Kind regards
Andreas

December 10, 2019 at 4:08 am #5096721

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I just realized that this ticket got closed and I was not able to get back to you about the issue with the Flatsome theme and the translation of image meta attributes.

Our compatibility team informed me that they found the following fix:

Go to /flatsome/inc/shortcodes/ux_image.php and add

$id = apply_filters('wpml_object_id', $id, 'attachment', true); 

after

if ( empty( $id ) ) {
		return '<div class="uxb-no-content uxb-image">Upload Image...</div>';
	}

I hope this solves the issue of your case.

Kind regards
Andreas

May 4, 2020 at 3:12 pm #6054557

viktorB-10

Hello Andreas!

Hope my message finds you in great health and spirit!
I just got to read your latest answer now and applied the changes. It works, thank you!

Based upon this good outcome, i'm still very determined to fix the other Flatsome UX elements similarly as well, respectively:
ux_banner.php
ux_gallery.php
ux_slider.php

these are top priority (as they cover the majority of our image content).

I tried to improve ux_gallery.php
at line 139

after
$attachments = array();
foreach ( $_attachments as $key => $val ) {

to change this:
$attachments[$val->ID] = $_attachments[$key];

to this:
//wpml image ID switch fix
$_attachments[$key] = apply_filters('wpml_object_id', $id, 'attachment', true);
$attachments[$val->ID] = $_attachments[$key];
}

..but probably some data format or other logic issues got, i can't solve yet. You sure have more knowledge then me now..

appreciate if you can take a look at this.

Then i (or your team) should send this and the ux_image.php over to FLatsome and push them to - FINALLY - .. hopefully incorporate it into their codebase..
LAst time i wrote them they claimed Flatsome is already WPML compatible. Which is partly can be true. But as you see, definitely not 100%. And it still means not 100% business outcome for webshops that are sensitive for strong image seo practices.

Thank you if you can help me with this.
Best,
Wiktor

May 4, 2020 at 4:47 pm #6055103

viktorB-10

update, since my recent answer:
now it seems i fixed the ux_gallery.php , managed to implement properly the wpml ID filter, after taking a better look at its definition. ^^

ALl the other UX elements i havn't checked/touched yet.