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, 7 months ago.
Assisted by: Sumit.
Author | Posts |
---|---|
April 12, 2023 at 7:41 am #13452663 | |
louisN-4 |
Hi Sumit, What are the next steps please |
April 12, 2023 at 8:26 am #13452959 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, That's good! I will now proceed with clearing leftovers as stated here https://wpml.org/forums/topic/slow-down-on-mass-price-update/page/4/#post-13416943 Please let me know if I have permission to proceed. Thanks |
April 12, 2023 at 10:59 am #13454675 | |
louisN-4 |
yes you have my permission to continue |
April 12, 2023 at 2:36 pm #13456863 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, I have done with the queries. All seems to be good now. There are 4751922 total images but only 3151914 are registered with WPML rest of them missing the language of images. Now you need to duplicate the media and leave the process until finished it may take a while. One weird thing I noticed when I was counting the media in DB. Someone is deleting media files on your site I am not sure what it is. But I see the difference in counting. Thanks |
April 12, 2023 at 2:40 pm #13456877 | |
louisN-4 |
are you talking about deleting new products or posts media deletion, if its OLD, this is indeed odd and we have to get to the bottom of it - I have started: "WPML >Settings > Media translation" |
April 12, 2023 at 2:53 pm #13457063 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
I am not sure I just wanted to let you know to avoid confusion because you know I was also working on the site. However, I don't see any difference in other post types except media. You can run this query to see the count of media in PHPMyAdmin SELECT COUNT(ID) as cnt FROM `lsk_posts` WHERE post_type = 'attachment'; You can remove the WP CLI that I added from the file. I hope server support has not started the command again? |
April 12, 2023 at 2:56 pm #13457119 | |
louisN-4 |
i am running what you asked, it started from and now stands on so its indeed going to take a while |
April 12, 2023 at 3:04 pm #13457135 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, Yes, it will take a while. So I would suggest as soon you as you add new language duplicate the media files manually overnight so you can avoid triggering the calls all in the middle when you are working on the site. You can also turn this off and have single media entry for all language but then you won't be able to translate the caption, alt etc. |
April 12, 2023 at 3:11 pm #13457145 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
I see your server support says the command is running but it seems they started again because it was finished. Please ask them to stop it and I will do the same process again. Don't worry any files will not be deleted the command is not written any way to delete the actual file or real media entry. Please confirm when it is done and I will repeat the process. |
April 12, 2023 at 3:13 pm #13457151 | |
louisN-4 |
i dont mind not translating alts 1. how can i stop this media duplication now, as you have seen in the email, knownhost reported to us falsely that the script finishd, and it didn't - SO this is the deletion you are seeing 2. how do i make the media duplication not needed? |
April 12, 2023 at 3:23 pm #13457243 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, I saw the command is not finished yet. I wonder why. Yes, please stop the duplication just refresh the page and it will be stopped. |
April 12, 2023 at 3:29 pm #13457259 | |
louisN-4 |
i refreshed the page, but i think our best "bet" would be what you suggested "turn this off and have single media entry for all language but then you won't be able to translate the caption" just tell me what to set in our settings, or you can set it, what ever you decide, this will put this subject behind us and redude load on wpml |
April 12, 2023 at 3:59 pm #13457583 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, I will let you know that method after testing on my local system what happens to existing media files. But I would like to let you know why that command still running. Please pay close attention to my feedback. I see there still a lot of duplicate media files. It seems the command is deleting the media and someone is creating the media thus it keeps running so long. It is not WPML for sure, because I wrote the script to delete and treat it as duplicate only if That is what WPML does when translating the media file into other languages. But in your database the date is different even the URL is same. Please see the screenshot. So the command will not delete them as those are not duplicates as per WPML concept. I can just guess it could be WP All import. So deleting them will not be a good idea as we don't know which one is being used on site. But I found the post it was uploaded to is deleted so it could be WP All import. I am sorry but I can not go further than this due to our policy you need to contact someone professional to clean the unused media file and free up some space to speed up the DB. I will update you how we can use media files without translating them. I hope it helps. PS:- If you are running the command just stop the import process until the command is finished. Thanks |
April 12, 2023 at 4:41 pm #13458071 | |
louisN-4 |
What you showed me is from January 14th, so it not something creating it now this is also why i suggested to avoid media duplication at all, and just use 1 media for all languages (will wait for your test) we have this plugin Regenerate Thumbnails or WP-All-Import that could have created issues for this media thingy, |
April 12, 2023 at 5:35 pm #13458619 | |
louisN-4 |
Sumit - you might also want to investigate with WP-All-Import, How do they handle Failed Imports, because if you ask me, this is what happened here. additionally another option, is that a post is getting deleted, but the db record for the media is not being deleted. |