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

Last updated by oldrichH 1 year, 5 months ago.

Assisted by: Andreas W..

Author Posts
August 14, 2023 at 1:53 pm #14197637

oldrichH

Tell us, what are you trying to do?
I've changed the size settings and the total set of generated thumbnails for the existing template.

Is there any documentation that you are following?
https://developer.wordpress.org/reference/functions/remove_image_size/
https://developer.wordpress.org/reference/functions/add_image_size/

Is there a similar example we could see?
hidden link - requested images does not exist anymore (they are loaded from CDN cache)
hidden link - original language is updated

OR

hidden link

What is the link to your site arc.cz

Simple. The entries for the duplicated media for translation in the postmeta table have not been updated by the wp CLI process wp media regenerate. I have no idea how to update these records for existing image sizes.

The question can only be answered by someone who is familiar with WP database architecture and WPML. The problem does not need to be replicated, it is a general question on how to proceed in the situation.

I don't need to use WP CLI but I need to solve the situation and update image size information in copied and translated media meta data. I need to be sure that already translated meta data will stay untouched.

I am asking a second time because the previous answer was not a solution at all.

August 15, 2023 at 8:57 am #14201835

oldrichH

Is the option "Clear Media Cache" tool in WPML the possible solution? This clears cached translated media files and forces WPML to freshly duplicate them. I hope all metadata translations will stay in database.

August 15, 2023 at 5:47 pm #14204605

oldrichH

Clear Media Cache tool seems to be no longer available in WPML.
Based on the suggestion of Shekhar Bhandari I reinitiated WPML Media Translation using START button again. There were only few images images fixed, but this function didn't update saved media metadata thumbnail sizes stored in postmeta table.

When I search:
SELECT * FROM `arc2018`.`wpweb_postmeta` WHERE (CONVERT(`meta_id` USING utf8) LIKE '%00002-detail_map_of_tynska_street-417x589.jpg%' OR CONVERT(`post_id` USING utf8) LIKE '%00002-detail_map_of_tynska_street-417x589.jpg%' OR CONVERT(`meta_key` USING utf8) LIKE '%00002-detail_map_of_tynska_street-417x589.jpg%' OR CONVERT(`meta_value` USING utf8) LIKE '%00002-detail_map_of_tynska_street-417x589.jpg%')

I will get 5 wrong records, one for each language. WPML is not able to manage its own records in the database...

Image 2023 46 15 002.png
August 15, 2023 at 10:14 pm #14205549

Andreas W.
Supporter

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

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

Hello,

I do sadly not see any example at the moment. Did you solve the issue already?

I do so far see the identical image sources and sizes here:
hidden link
hidden link

You can sync the media library at WPML > Settings > Media Translation > Start.

Guide:
https://wpml.org/documentation/getting-started-guide/media-translation/#id5

If this will not solve the issue, then the right way to solve the issue would be by applying the translations again.

Anything apart would be custom work and this is not covered by our support policy.

https://wpml.org/purchase/support-policy/

Best regards
Andreas

August 16, 2023 at 10:56 am #14208765

oldrichH

Hello Andres,
you don't see missing images at link hidden link or hidden link ?

Probably I have broken computer and my client too.

I preformed some analytical SQL queries and there are over 31000 duplicates with completely wrong image sizes...

There is nothing about updating image sizes in WPML media duplicates which are managed by WPML in your guide.

If this is not implemented at all, please ask developers for an SQL query to update duplicated metadata from originals.

August 16, 2023 at 1:49 pm #14236547

oldrichH

I made a complex SQL query to fix this problem by single click.
I like to apply for a job, contact me at norbou.com 🙂

August 16, 2023 at 1:57 pm #14236855

Andreas W.
Supporter

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

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

Hello,

The sync setting is not at WPML > Media.

As I said earlier, it is at You can sync the media library at WPML > Settings > Media Translation > Start.

Guide and Screenshot:
https://wpml.org/documentation/getting-started-guide/media-translation/#id5

Best regards
Andreas

August 17, 2023 at 8:29 pm #14248705

oldrichH

Hello, I would like to say to all audience, that I have tested suggested solution:

sync the media library at WPML > Settings > Media Translation > Start

...before creating this ticket.

It does not work and I see in the database that wrong media sizes stay in duplicated records after completing this "sync". It only creates new duplicates which are missing but without any update function. I thing this is uncovered situation by WPML management.