Skip to content Skip to sidebar

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.

Tagged: 

This topic contains 35 replies, has 0 voices.

Last updated by Dražen 3 months ago.

Assisted by: Dražen.

Author Posts
May 13, 2026 at 7:53 am #18031982

T4ng

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

May 13, 2026 at 9:05 am #18032312

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

here is the ticket.

Please share Duplicator package of website and steps to see the issue and I would be glad to check and help further.

- https://wpml.org/fr/faq/provide-supporters-copy-site/

Regards,
Drazen

May 13, 2026 at 12:13 pm #18032863

T4ng

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?

Thanks

Capture d'écran 2026-05-13 113732.png
Capture d'écran 2026-05-13 113827.png
May 14, 2026 at 5:17 am #18034593

Dražen
Supporter

Hello,

thanks for detailed reply and further investigation.

Sure, database would be enough, please share with page title where we can see the issue.

Regards,
Drazen

May 15, 2026 at 6:17 am #18037431

Dražen
Supporter

Hello,

Thanks for getting back to me.

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?

Regards,
Drazen

May 15, 2026 at 10:00 am #18038325

T4ng

Hi,
Thanks for your quick feedback.

What you ask is not a simple process.

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.

Let me know if it'd work for you.

Thanks!

May 15, 2026 at 10:48 am #18038555

Dražen
Supporter

Hello,

Sure, let’s try it that way.

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.

Thanks!

Regards,
Drazen

May 15, 2026 at 11:09 am #18038612

T4ng

Great!

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

Best Regards,

May 15, 2026 at 12:04 pm #18038722

Dražen
Supporter

Hello,

Thanks for sharing the media IDs.

I have now escalated this to our 2nd tier team for further investigation and advice. Once I receive an update from them, I will get back to you.

Regards,
Drazen

May 19, 2026 at 9:09 am #18045002

Dražen
Supporter

Hello,

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.

Use the following code:

$ex_elementor = get_posts( [
    'post_type'      => 'any',
    'post_status'    => 'any',
    'posts_per_page' => -1,
    'fields'         => 'ids',
    'meta_query'     => [
        'relation' => 'AND',
        [
            'key'     => '_elementor_data',
            'compare' => 'EXISTS',
        ],
        [
            'relation' => 'OR',
            [
                'key'     => '_elementor_edit_mode',
                'compare' => 'NOT EXISTS',
            ],
            [
                'key'     => '_elementor_edit_mode',
                'value'   => 'builder',
                'compare' => '!=',
            ],
        ],
        [
            'key'     => 'referenced_media_ids',
            'value'   => 'a:0:{}',
            'compare' => '!=',
        ],
        [
            'key'     => 'referenced_media_ids',
            'compare' => 'EXISTS',
        ],
    ],
] );

foreach ($ex_elementor as $id) {

    update_post_meta( $id, 'referenced_media_ids', [] );
}

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.

Regards,
Drazen

May 19, 2026 at 1:26 pm #18045949

T4ng

Hi Dražen,

This seems like elegant solution.

I'll give it a try soon and let you know.

Thanks

May 20, 2026 at 6:08 am #18047234

Dražen
Supporter

Hello,

Great, glad to hear that.

Sure give it a try when you have a chance and let me know how it goes.
Regards,
Drazen

May 20, 2026 at 3:21 pm #18049157

T4ng

Hi Drazen,
I just gave it a quick test.

It doesn't work.

I gave a --dry-run test to this adaptation of your script.
Result:
"Matched: 0
Dry run only. No updates performed."

Explanation from AI:
"The Matched: 0 is because this database has zero rows with the exact meta key referenced_media_ids."

Best Regards,

May 21, 2026 at 6:29 am #18050045

Dražen
Supporter

Hello,

thanks for testing and for the detailed feedback.

I will forward this to our 2nd tier team to check and will get back to you once I have more information from them.

Regards,
Drazen

May 21, 2026 at 7:46 am #18050252

T4ng

Thanks.
One precision.
I adjusted your code to add a dry run method.

That's the reason for the "Dry run only. No updates performed."

But it's still essentially the code you provided:
hidden link