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: Not WPML issue
This topic contains 28 replies, has 3 voices.
Last updated by Sumit 1 year, 9 months ago.
Assisted by: Sumit.
Author | Posts |
---|---|
January 18, 2023 at 6:16 pm #12845667 | |
Faisal Ahammad |
Hi there, To resolve this issue, please follow these steps: 1. Navigate to WPML > Support > Troubleshooting I hope this helps. Please let me know how it goes. Thank you, |
January 19, 2023 at 7:54 am #12848215 | |
kristoferS-2 |
I ran the "Remove ghost entries..." function from the troubleshooting page and got the "Done!" confirmation. Now the sql errors in the error_log file does not appear but updating the page still times out. Same in the cloudways clone. |
January 19, 2023 at 9:27 am #12848627 | |
Faisal Ahammad |
Hi, Thank you for your patience. |
January 24, 2023 at 2:11 pm #12882649 | |
Faisal Ahammad |
Hi, Additionally, we have noted that you have set your website to translate the media files into English in WPML settings; however, this process may take a couple of hours due to the large number of files. As a solution, we recommend duplicating the media files, which will allow for translation of media description, caption, and alt text. Please be aware that this process may also take a significant amount of time. Check the following link for more details: https://wpml.org/documentation/getting-started-guide/media-translation/#id5 If you have any further questions or concerns, please do not hesitate to contact us. Thank you |
January 25, 2023 at 12:04 pm #12889651 | |
kristoferS-2 |
That is very strange. I just started media duplication from Media Translation settings and it is counting around 90 000 items. However, from the Media section of the dashboard I only have about 1 000 items. How is it possible that WPML is counting that many more media items than my media library? |
January 25, 2023 at 3:32 pm #12891753 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, I am Sumit from 2nd tier support. As I can see the total media files in your database is 250 thousand approx. Please see the attached screenshot. This is expected when media files missing the language records (i.e. no language attached) are not displayed in the media library. If you disable WPML you will see the same number of results in the media library as in the database. I checked the few media entries closely and it seems those are corrupted may be due to some plugins/theme or database operations. If you don't want to use those media files please consider using this plugin https://wordpress.org/plugins/media-cleaner/ and remove the records. Before that please make sure #1 You have a full backup of site files and database. Afte cleaning up media files you can try duplication in WPML media. I hope it will help to fix this issue. Thanks |
January 27, 2023 at 8:19 am #12902179 | |
kristoferS-2 |
Thanks for the information. I am in the process of running Media Cleaner and it is taking very long time indeed. It may be a few days before the next update so please keep the case open. I could of course have deleted the non functioning page and recreated it but I thought could be a good idea to find the root cause of the timeout. In this case the page had a broken attachment reference that was duplicated over 100 000 times. Really appreciate the thorough investigation. |
January 27, 2023 at 7:48 pm #12906509 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, Thanks for the feedback.
Do you mean the page was having a broken attachment and then created duplicated entries in the database because of WPML? Of course, if the problem is caused by WPML we will try to replicate it on a fresh site and report it to the devs. And I really thank you for the help in this troubleshooting. Thanks |
January 30, 2023 at 8:56 am #12919341 | |
kristoferS-2 |
I have already deleted these attachments from my site. But in the clone that you setup for me you should be able to find a large number of attachments in the wp_posts table that contains AdobeStock in the guid. I gave up on Media Cleaner because it was so slow and kept stopping after running it for days with little progress. I reviewed the source code for the delete function Media Cleaner, which led me to wp_delete_attachment in core. Judging from that what I needed to do was: 1. Delete the corrupt Media posts DELETE FROM wp_posts WHERE post_type = 'attachment' AND guid = 'GUID YOU WANT TO DELETE HERE' 2. Delete any remaining orphaned metadata (thanks hidden link) DELETE pm FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL In this case the file did no longer exist in my uploads folder so I did not have to do anything about that. I am not sure if WPML truly was the culprit here, but disabling WPML was what led to the discovery of all these duplicated attachments. After deleting these they do not seem to be recreated upon updating the page that was timing out. |
January 30, 2023 at 1:44 pm #12922179 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, Thank you very much for the details. I will look into the issue as soon as I can. For now, the issue on your site has been fixed right? Thanks |
January 30, 2023 at 2:06 pm #12922341 | |
kristoferS-2 |
Yes the issue in my site is resolved. I understand you can investigate the corrupted database in your clone in case you want to investigate it further. |
February 1, 2023 at 7:03 am #12934843 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, Just to update you I have investigated the issue and those thousands of records are created by WPML but the issue was not due to any logical error in WPML but due to a corrupted database. Let me explain what happened. When you update the post in English or update the translation, WPML tries to translate the image but after inserting the attachment entry WPML fails on setting the language and thus it keeps increasing the post table. Solution:- I think not just WPML but any software can behave unexpectedly due to a corrupted database but our troubleshooting options are designed to fix most of the corruption issues. So you can always run them after taking a database backup if you see any issue related to database corruption. Thanks |
February 1, 2023 at 7:21 am #12934919 | |
kristoferS-2 |
Thank you for the update. I truly appreciate the effort you put into this. |
February 2, 2023 at 3:21 pm #12949023 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Thank you! Since you confirmed the issue is fixed I am closing this. 🙂 |