Home›Support›English Support›[Resolved] How to get rig from Elementor fields when moving back a post to standard gubengerg / blocks content?
[Resolved] How to get rig from Elementor fields when moving back a post to standard gubengerg / blocks content?
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is transitioning from Elementor to standard Gutenberg blocks and encounters an issue where the WPML Classic Translation Editor (CTE) still displays media from previous page states for translation, even though these media are no longer present in the current page content.
Solution: We recommend disabling the automatic inclusion of media in translation jobs to prevent outdated media from appearing in the CTE. You can do this by navigating to: WPML → Settings → Media Translation > Translate Media Library texts and turning off the option 'Automatically detect best options for translating image texts'. For pages where translation jobs already exist, you will need to create a new translation job by either resending the page for translation from WPML → Translation Management / Dashboard or by making a minor edit to the original page and saving it. This action forces WPML to generate a new translation job.
Please note that this solution might not be relevant if it's outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket at WPML support forum.
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.
I'm progressively getting rid of Elementor, to switch back to standart blocks. Unfortunately, even after the original page has been changed to standard, WPML CTE keeps offering the Elementor content for translation
I have cleared all the content I could for that specific page:
- Removed the Elementor content from the elementor view from that page
- Moved back to the Gutenberg editor, and pasted the (pre-copied) content and hit SAVE
- Removed all the translations permanently (these were already on a WordPress template, not Elementor)
- Removed all the blocks from the original content, and hit SAVE
- Removed the Elementor AND Gutenberg WPML Packages
- Cleared Elementor Data
- Cleared WPML Cache + Ghost entries + Cleaned up and optimized string tables
- There's no translation job for that page anymore
- There's no cache plugin running (and W3TC's been cleared before deactivation
Elementor data is now empty for that post (238) in the database : "[]".
So the only content I should be left with for that post is a title a slug, and a meta description.
Now if I hit + to create a new translation for that page, from that original empty content, I'm offered for translation with the page title, SEO metadatas... and the multiple media that were used on the Elementor page, + some that were never added to that specific page.
I checked the code content of the blocks before deleting it : no mention of these images.
So I had a look in the db, for one of these images' ID (66097) that's not used anywhere on the website anymore. It's still in the library but absent of the content. And found occurences in:
- icl_translations (1)
- icl_translate (6)
- postmeta as post_id with the _wpml_media_usage and _translation_status_en meta_key (2)
Therefore, I understand WPML retains legacy informations about this media that has nothing to do with existing content anymore.
For now, as expected, I have a hard time duplicating the website (I face a CloudFront 60s timeout), so I can only provide you with a database.
Is it sufficient for you to troubleshoot this issue?
Yes, what you described makes sense and those entries are probably leftovers from Elementor. It could have happened due to some bug or during the switching process.
In any case, the best way forward now would be to confirm this further, identify the exact reason, and hopefully find a simpler cleanup solution. We would be glad to help with that.
I have already taken the database and deployed it locally, and I can partially see the issue. However, the main problem is that the images are missing or broken, so I cannot clearly determine which image belongs to which section. You are also using custom blocks from your theme, so some parts of the page are broken locally as well, but I assume that part is not important for this issue.
What would help most is being able to properly see which images are used on the page and which ones appear inside the CTE.
Could you please provide the uploads folder as well, or at least the specific uploads folders needed for this page example, so I can investigate it properly?
Instead, what if I provide you with the IDs of the medias that appear on the page?
I assume it's much easier than actually retrieving the actual images: all I would need is picking the IDs of the images used in the current block content.
All the other images are leftovers from earlier versions of that page.
Once I confirm the issue using the media IDs, I will forward everything to our 2nd tier team for further investigation. Let’s first see if that information is enough for them to debug the problem, and if not, we will update you with any additional details needed.
Please share the media IDs, and I will proceed from there.
Here are the IDs of the 11 images appearing in the block page content. All the other ones are useless now.
6027
58391
76487
76488
76490
76491
76492
76493
76494
76495
76496
I discussed this further with our 2nd tier team, and they provided a workaround which should help clean the affected data for posts impacted by this issue.
I recommend using the Code Snippets plugin for this.
Please create a new snippet and set its “Location” / execution option to “Only run once”, so you can manually run it again later if needed.
Important:
After running the snippet and cleaning the affected data, you will need to create new translation jobs for the affected content.
This means instead of simply clicking the translation edit pencil/icon, please resend the affected posts/pages for translation via WPML > Translation Management / Translation Dashboard.
This will generate fresh translation jobs and properly rebuild the translation data.