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 9 replies, has 2 voices.

Last updated by idaL 1 week, 4 days ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
September 26, 2019 at 7:39 am #4644055

idaL

I am trying to:

Link to a page where the issue can be seen:

hidden link
hidden link
hidden link

I expected to see:
In the English version the correct photos are displayed, while on the other two versions there are still some old photos that I actually already cancelled from the media uploads... Why is wpml not copying the pictures from the English version into the other ones, even though I selected to copy them?

In order to visit the staging website you need the access code. Kindly send me the form for sending private messages and I will forward it to you.
I will also send you the access to the wp-admin

September 26, 2019 at 4:08 pm #4648721

idaL

Dear Shekhar,

this is what the theme support is answering:

Can you please let WPML support know that we are doing the following to display those thumbnail images:

global $post;
get_the_post_thumbnail($post->ID, "thumbnail", array('title' => $image_title));

Kind regards,
Ida

September 27, 2019 at 12:48 am #4650721

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Did they mentioned in while file they are adding these? Please ask them and try to use the following code instead and let me know if that helps?

global $post;
$post_id = apply_filters( 'wpml_object_id', $post->ID, 'post' );
get_the_post_thumbnail($post_id, "thumbnail", array('title' => $image_title));

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

Look forward to your reply.

Thanks

September 27, 2019 at 6:30 am #4651867

idaL

HI, Shekhar, I posted your message to the theme support, but I don't think they will change a code for me....
Why is it working in the English version and not in the Italian and the German one?
And also: where is wpml taking the wrong thumbnails from? I already deleted the original photos, so they should not be available anymore on my website. I cannot use them as I don't have the licenses...
Kindly let me know.

September 27, 2019 at 6:58 am #4651925

idaL

... I checked: if you try to save the pictures that the foreign versions are displaying, you will note that the pictures' titles are not present inside of the media library! How is this possible? Where is wpml taking those pictures from that are not existing anymore?

September 27, 2019 at 8:25 am #4652255

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Yes, you can ask for the file location of the code along with line number so we can see if that will help.

Regarding WPML showing deleted images, can you confirm that you deleted this pictures from the other languages too, for example when deleting the images you should follow the below steps:
- Go to Media Libary
- Delete the media
- Change the language from top bar and delete from there too.

Alternatively, you can go to WPML->Settings->Multilingual content setup ->Posts and pages synchronization and check "When deleting a post, delete translations as well"

 if you try to save the pictures that the foreign versions are displaying, you will note that the pictures' titles are not present inside of the media library! How is this possible? Where is wpml taking those pictures from that are not existing anymore?

Can you please attach few screenshots showing the issue?

Look forward to your reply.

Thanks

September 27, 2019 at 8:55 am #4652411

idaL

Hi Shekhar,
I now asked them for the exact line of the code for picking the thumbnails of the destination lists.

The theme support is saying in the meantime:

"It looks like you may have had this website with the original language as Italian in the past?

If you search for croatian in the media, you will see that the problem image appears with Italian as the original?

hidden link

Perhaps you are best in re-setting the image for these locations in English, and then making sure the translations also have the right image?"

I am not aware of having worked in Italian in the past, but maybe it could help to solve the solution?
I am now deleting the images in the foreign language media lists, too, but now the destination lists thumbnails remain simply empty. There is no thumbnail at all showing now... 🙁

September 28, 2019 at 6:59 am #4658009

idaL

Hi Shekhar,
the theme support answered that the code is located in the following line:

"Hi,

Sure. It is includes/parts/accommodation/accommodation-item.php

Line 62"

I must also advise you that while we were talking, all at once the "Croatia" destination is now displaying correctly the thumbnail in all the languages while others still don't. So how comes that suddenly Croatia is working?

Best regards,
Ida

September 30, 2019 at 4:26 am #4662313

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

As a test can you disable WPML and see if that helps?

Further, could you please go to WPML-> Support ->Troubleshooting and click the below buttons:

+ Clear Cache in WPML
+ Set Language information
+ Fix element types collation
+ Remove ghost entries from the translation tables
+ Assign translation status to duplicated content
+ Set language information

Look forward to your reply.

Thanks

October 3, 2019 at 7:55 am #4685529

idaL

My issue is resolved now. Thank you!