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 19 replies, has 2 voices.
Last updated by xiaoweiX 2 years, 3 months ago.
Assisted by: Nigel.
Author | Posts |
---|---|
August 24, 2022 at 7:20 am #11917995 | |
xiaoweiX |
We had to switch on Italian on the live site because our staff couldn't afford to wait. Server load increase is pretty visible. I wonder if you have pinpointed the cause yet? Is there a temporary fix we could take to bring down the load (something in the WPML core you mentioned)? I am worried about the health of the app. One thing that has been puzzling me is that when we enabled Spanish, everything was fine, the problem seems to happen only when a second or more translation language is added. I wonder if that rings any bells? Thanks |
August 24, 2022 at 3:32 pm #11923853 | |
Nigel Supporter Timezone: Europe/Madrid (GMT+01:00) |
My colleague has been looking at this today and has identified the source of the problem. The batch job to translate media is stuck (and keeps retrying) because of problems with the entries in the database. Specifically it looks like you used a plugin "Media Cleaner" which has removed media attachment posts, but our WPML translation tables still contain references to these attachment posts. The attachment posts now have a custom post status assigned by that plugin of wmpc-trash. To get past this problem it looks like you should re-install that plugin and either restore the images or permanently delete them. We are basing this advice on the description of the plugin from here: https://wordpress.org/plugins/media-cleaner/ We don't have any specialist knowledge of it, but do note that it comes with heavy warning signs about taking a backup before using the plugin. If it's not possible to restore or permanently delete these media posts by re-installing the plugin then you should revert to the backup taken before using that plugin. Once you have resolved that problem then the batch job to translate media will be able to function normally, although it will take some time to complete given the size of your site and the number of images. You should be able to go to WPML > Settings > Media Translation and start the batch job (as described here: https://wpml.org/documentation/getting-started-guide/media-translation/#id5) and see it counting down the media it has processed. If it does indeed count down then the issue you raised is solved and we should be able to close here. |
August 25, 2022 at 7:25 am #11926763 | |
xiaoweiX |
Thank you for finding the cause! I have deleted all images in Media Cleaner Trash: hidden link I will get back to you in a couple of days and confirm whether this has taken care of the issue. Also, since I don't need WPML media translation and have deactivated the addon, how can I ensure WPML core won't carry out any media-related tasks other than clearing Media Cleaner trash? |
August 26, 2022 at 1:28 pm #11937747 | |
Nigel Supporter Timezone: Europe/Madrid (GMT+01:00) |
The WPML Media add-on plugin is specifically for when you want to translate the texts associated with media or where you want to display different images on different language versions of a post. But the WPML plugin itself is still involved with media (and is responsible for running these batch jobs). It sets language information about uploaded media, and is able to duplicate the attachment posts associated with the media into other language versions (without actually translating the text from the original language) so that those media can be used in posts and pages of different languages. And it can automatically make these alternate language versions available when you translate content. e.g. if you had a post in English whose featured image was a picture of a dog, it could make a "Spanish" version of the dog picture (even though any texts remain in English if you don't translate them) and automatically set this Spanish version as the featured image of the Spanish translation of the original post you create. Looking at your website it looks like you would want that at a minimum (the same images to be available on different language versions of your posts), and that is handled by the core WPML plugin. Any slowness (after fixing the above issue) comes from the batch job to create alternate language versions of the attachment posts, given how large your media library is, but that is a one-off task, and when adding new media the time required to create alternate language versions should be minimal. |
September 5, 2022 at 7:09 am #11986535 | |
xiaoweiX |
Sorry for the delay. I confirm that after clearing trashed media files from 3rd-party plugin, the issue has been fixed. Thanks! |