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: Compatibility
This topic contains 113 replies, has 3 voices.
Last updated by Sumit 1 year, 4 months ago.
Assisted by: Sumit.
Author | Posts |
---|---|
March 28, 2023 at 11:08 pm #13353237 | |
louisN-4 |
"duplicate images, I found few of them" how did you find them so quickly, i am running media cleaner, it still didn't find anything |
March 29, 2023 at 7:33 am #13355081 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, For point #4 once we have the media files translated completely it should solve this issue otherwise we will debug it. For this message https://wpml.org/forums/topic/slow-down-on-mass-price-update/#post-13220995 I have not replicated it yet. #5 No problem. Keep it as it is. #6 Okay let's keep it too.
I run this query SELECT COUNT(guid) as item_counts, guid, ID FROM `lsk_posts` WHERE post_type = 'attachment' GROUP BY guid ORDER BY item_counts DESC; This gives me It is possible that same image is uploaded multiple times but it should not be 400, 300, 200. I hope it helps. Thanks |
March 29, 2023 at 8:31 am #13355441 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
If you run this query SELECT * FROM `lsk_posts` WHERE `guid` NOT LIKE '<em><u>hidden link</u></em>' AND `post_type` = 'attachment'; You can see these images are missing the mime type and has an invalid image URL. |
March 29, 2023 at 8:37 am #13355497 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
If you are having issues with media cleaner because of large data. I can write a script to detect and delete media posts. The problem here is we can't find which image post to delete and which to keep. Suppose there are 400 entries in the database for the same URL. Now the problem is how to find which one of them is being used on the front-end. Assuming that the first one is the original image (oldest ID) and then find its translation in WPML then delete all items except the oldest ID and its translation. But again if our assumption goes wrong we need to correct the post manually for missing images. Please let me know what do you think. |
March 29, 2023 at 3:33 pm #13359975 | |
louisN-4 |
Hey Sumit 1. YES I NEED YOUR HELP ON THIS - media cleaner has stopped in the middle "If you are having issues with media cleaner because of large data. I can write a script to detect and delete media posts." 2. This is simply indexing the JOIN between the tables would resolve the issue, also phpmyadmin advisor is speaking about this problem "https://wpml.org/forums/topic/slow-down-on-mass-price-update/#post-13220995" |
March 31, 2023 at 12:42 am #13371135 | |
louisN-4 |
any update sumit please? |
March 31, 2023 at 10:03 am #13374555 | |
louisN-4 |
as you saw in the email corrospondance, media cleaner doesn't work on large sites we really need a solution from you about this bug |
March 31, 2023 at 3:23 pm #13377299 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, Okay, I can see the media cleaner is not working correctly. Please allow me some time to write and test the script to clean the media.
Please note we will not delete the physical file from the disk we are going to delete only the media entry in the database so no thumbnail deletion is needed.
Sorry, but this is not possible. This is DB corruption and we usually patch the DB in case of corruption because DB corruption can happen beyond our imagination and it is not possible to cover all the cases by automatic repair. We have covered a lot of cases in WPML troubleshooting but this is the first we see in years.
I am not sure if this happens with brand creation. If you can replicate it on the staging site and share the steps with me then of course I will report to our development team.
I am sorry but I am not following what do you mean by indexing the join. The query you are pointing out is not the WPML query it is WooCommerce query or some add-on query we are just joining it with our tabels. If your PHPMyAdmin adviser can explain to me an example of how to INDEX a Join then it would be good. Thanks |
March 31, 2023 at 3:27 pm #13377329 | |
louisN-4 |
regarding deleting db pointing to duplicate images - i will wait for your script or fix regarding the JOIN (https://wpml.org/forums/topic/slow-down-on-mass-price-update/#post-13220995) + hidden link |
March 31, 2023 at 3:40 pm #13377401 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi,
|
March 31, 2023 at 3:44 pm #13377409 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, I saw you wrote an email to support. I will wait for their answer. Thank you 🙂 |
April 1, 2023 at 1:25 pm #13381173 | |
louisN-4 |
knownhost answered and gave a paste you also have the phpmyadmin access, so you can check if all the relevant tables are indexed including the woocommerce |
April 3, 2023 at 3:16 pm #13392057 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, As I saw in the mail. They just suggested the idea of indexing without checking whether it is. I already checked this in your database all tables are indexed. I will double-check them if any default indexes are missing but right now I am working on the script it is 50% completed. I will share the script once it is done. Thanks |
April 3, 2023 at 3:29 pm #13392447 | |
louisN-4 |
1. maybe the woocommerce table that is related to the price sync is not indexed? can you check please? 2. about media script, thanks eagerly waiting for it... 3.you have a bug on this forum - i think, where i try to read this page: it sends me back to: |
April 5, 2023 at 8:57 am #13407725 | |
louisN-4 |
hello sumit, any update on the script for media duplicate issue? |