Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Kyiv (GMT+03:00)

Tagged: 

This topic contains 7 replies, has 0 voices.

Last updated by yavuzS-4 10 hours, 46 minutes ago.

Assisted by: Andrey.

Author Posts
April 6, 2026 at 5:13 pm #17952114

yavuzS-4

Hi,

The site migration is now complete and oss-material.ca is properly registered as an independent site. However, the original fatal error still persists even after updating to WPML 4.9.2.

The error occurs when saving or editing an existing translation page in the WordPress editor. WordPress attempts to create a post revision during save, wp_insert_post returns null, and WPML's hook crashes because it expects a WP_Post object.

Full error details:

An error of type E_ERROR was caused in line 55 of the file:
wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/UserInterface/Web/Infrastructure/WordPress/CompositionRoot/Config/Event/Translation/Links/ItemUpdateEvent.php

Error message:
Uncaught TypeError: Argument #2 ($post) must be of type WP_Post, null given, called in wp-includes/class-wp-hook.php on line 343

Stack trace summary:
- edit_post() is called
- wp_update_post() triggers wp_insert_post()
- wp_after_insert_post() fires
- wp_save_post_revision_on_insert() is called
- wp_save_post_revision() → _wp_put_post_revision() → wp_insert_post() returns null
- do_action('save_post', 2572, NULL) is fired with null post
- WPML's ItemUpdateEvent closure receives null instead of WP_Post and crashes

This appears to be a bug in WPML 4.9.2 where the ItemUpdateEvent hook does not handle a null $post argument gracefully. Could you please escalate this as a bug report or provide a fix?

Thank you!

April 7, 2026 at 1:22 pm #17954460

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

Did you migrate the site using the All-in-One WP Migration plugin? If so, you may be encountering a known issue.

Please follow the workaround described here to resolve it:
https://wpml.org/errata/all-in-one-wp-migration-database-error-missing-uuid-column-after-migration/

April 7, 2026 at 2:07 pm #17954536

yavuzS-4

Hi Andrey,

I used UpdraftPlus plugin for migration.

April 7, 2026 at 2:14 pm #17954556

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Are you sure that the entire database and all files were migrated correctly?

Would it be possible to perform a test migration to a local environment using an alternative method (e.g., a plugin like Duplicator or All-in-One WP Migration within the fix above) and check whether the issue still occurs?

I’ve also enabled debug information for this support ticket. Please follow this guide to retrieve it from your site and share it

April 7, 2026 at 2:20 pm #17954562

yavuzS-4

Same setup and content works fine on another server where I copied the content from.
I also migrated the very same web page on another (3rd one for testing purposes) server, and that works fine too.
Also used UpdraftPlus for the test migration.

April 7, 2026 at 2:25 pm #17954585

yavuzS-4

added the info.

April 7, 2026 at 2:27 pm #17954588

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

I suspect this may be related to a server configuration issue or possibly corrupted database entries.

I would need temporary access to your site (wp-admin and FTP)—preferably to a staging or test environment where the issue can be reproduced. When you submit your next reply, you will find the required fields below the comment area. Please note that this information is private and will only be visible to you and me.

Additionally, please provide the exact steps to reproduce the issue, so I can follow the same process on my end.

Let me know if I have your permission to temporarily install the Adminer plugin.

April 7, 2026 at 6:41 pm #17955066

yavuzS-4

The fatal error sometimes occurs.
I use WordPress editor to create translated versions of the pages.
I do not use translation dashboard since I need to change page content and layout when necessary.

So to create a language version of the related page I click + sign on the right of the page name (ie: please see the attached 001.png as an example to create the Portuguese version of the page).

Then I copy the content from English verison and then change all the text (content) to that language (ie: Portuguese).

After clicking publish, WordPress normally saves. It generally does.

But sometimes I get that fatal error (did not get a screenshot but it says: "There has been a critical error on this website. Please check your site admin email inbox for instructions. If you continue to have problems, please try the support forums. Learn more about troubleshooting WordPress.").

The interesting part is that, the page is saved despite that error.

I'm not sure if there's been a firewall delay just about that saving process and WPML can not communicate with its servers at that exact delay period, or there's a mistake on the database itself. I'm not a code guy, just try to understand and solve the issue.

001.png