Background of the issue:
I encountered a fatal error when trying to fix the collation using the troubleshooting page in the WPML plugin on my website. I clicked the button 'Fixes the collation of the element_type column in icl_translations in case this setting changed for your posts.post_type column' from the WPML troubleshooting page.
Symptoms:
An error of type E_ERROR was caused in line 698 of the file /wp-content/plugins/sitepress-multilingual-cms/inc/functions.php. Error message: Uncaught Exception: Duplicate entry 'package_page-builder-shortcode-strin-96' for key 'el_type_id'.
Questions:
Could you please advise how to fix this properly?
Is there an update addressing this issue?
Thank you for contacting the support. I moved to this ticket as discussed.
I've checked with my team and they suggest to try the following:
IMPORTANT: Please take full backup of your website and database beforehand.
- Cancel the job.
- Resave the languages from WPML > Languages > Edit Languages (simply save without making any change).
- Resend the affected page via Translation Management Dashboard.
Please let me know if this helps, or I'll try my best to help you further on the matter.
Thank you for your suggestions. I followed the steps you provided:
Took a full backup of my site and database.
Cancelled the job.
Resaved the languages from WPML > Languages > Edit Languages (just clicked save without any changes).
Resent the affected page via the Translation Management Dashboard.
After that, I noticed a new option appeared on the same page. However, when I go to the WPML Troubleshooting page and click on the Fix Element Type button, the loading spinner just keeps spinning indefinitely and nothing happens.
Also, I want to mention that I clicked this same button yesterday, which caused the fatal error that led me to open this ticket.
Could you please advise what to do next? Is there any manual fix or alternative way to solve this issue?
I need to take a closer look at your site. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.
Your next answer will be private, to share this information safely.
Also provide detailed steps to reproduce the issue and links to pages in the admin and on the frontend.
IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.