Home›Support›English Support›[Closed] I have a translated custom post type which appears to be translated but is not
[Closed] I have a translated custom post type which appears to be translated but is not
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.
No supporters are available to work today on this forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Tell us what you are trying to do?
I am clicking on the + icon for an Italian translation. I translate all the fields, and check the box. I see translated 100%. I save and close it and the + icon is still there. If I do it again, all the Italian I have written is there.
What is the link to your site? hidden link
You can see no Italian page appears under the language. If you got to an Italian page (hidden link) you will see some Italian, but that is just the Elementor template I am using. The content is still the English.
Could you kindly attempt to make minor modifications to the primary language page and then try translating it once more to see if it functions as expected?
Also, please update the WPML plugins to the latest version.
I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.
I am going to create a staging site. Please provide me your email.
Also I think the issue is that I have somehow lost the posts related to the translations. I do not know the database well, but I can see how there is an issue with the data.
I have managed to fix one of my posts. I found that the post record was missing for the Italian translation. In the wp_icl_translations table, there is a element_id, but that post_id does not exist in wp_posts. I removed the element_id (ie. set it to NULL) and redid the translation and now it works.
I also wrote a query that found 402 such records:
SELECT *
FROM wp_icl_translations
LEFT JOIN
wp_posts
ON
wp_posts.ID = wp_icl_translations.element_id
WHERE wp_icl_translations.element_id IS NOT NULL AND wp_posts.ID IS NULL;
I am considering using this query to set the element_id to NULL for all of them.
Does WPML have any commands to help clean up the table of these bad records?