This thread is resolved. Here is a description of the problem and solution.
Problem:
Update media sizes metadata in media translation duplicates
Solution:
0% of people find this useful.
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: Feature request
This topic contains 6 replies, has 3 voices.
Last updated by Bruno Kos 1 year, 7 months ago.
Assisted by: Bruno Kos.
Author | Posts |
---|---|
April 9, 2023 at 1:35 pm #13434219 | |
oldrichH |
Tell us, what are you trying to do? Is there any documentation that you are following? Is there a similar example we could see? 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. |
April 10, 2023 at 4:09 pm #13438457 | |
Andreas |
Hi, before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process. I understand what you are asking but I am afraid that at the current point, it will not work with CLI because we are not having support for CLI and the command doesn't know to check thumbnails per language in the database. We can add feature requests if you wish. As I workaround to regenerate the thumbnails per language, I would suggest this solution : Regards, |
April 12, 2023 at 9:45 am #13453983 | |
oldrichH |
Hi Andreas, However, maybe your colleagues can advise me on some magic SQL statement that will ensure that the updated POSTMETA size data of existing thumbnails is transferred to their translation copies without overwriting the translated text in them. Otherwise there's nothing to debug here, I'm really only referring to the basic functionality of WP and WPML. If your way of translating media can be considered an ideal standard, perhaps WordPress itself could support it instead. But I don't know how other translation plugins work. If you need, I can export and attach a sample of non updated field from wp_postmeta. With best regards, |
April 12, 2023 at 12:06 pm #13455719 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, I submitted this as a feature request that would be "wp media regenerate working for thumbnails in all the languages". I think this describes it well, let me know if any further details you want to share with us. Regards, |
April 15, 2023 at 3:15 pm #13479209 | |
oldrichH |
Can't we come up with some SQL statement that would handle this once? BTW, I was doing a database inventory and found inconsistencies with some attachment file posts whose TRID was tied to a page type attachment. I could tell you what's going on under the hood of our WPML... |
April 17, 2023 at 7:40 am #13484677 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, I do not think that would work as we need to process all media and recreate physical copies of these files, nor I have any example of such SQL queries. Regards, |
May 16, 2023 at 7:01 am #13652415 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, After examining various use cases and all the tickets we had so far, it was decided not to implement such feature request given that it can be done through plugins such as Regenerate thumbnails and is in fact a rare occurrence where such complex functionality in WPML would be needed. Regards, |