Support » Plugin: Elementor Page Builder » Critical error on post-new.php

  • Stefan Pejcic

    (@stefanpejcic)


    Uncaught Error: Argument 2 passed to Elementor\TemplateLibrary\Source_Local::on_save_post() must be an instance of WP_Post, null given, called in /home1/public_html/wp-includes/class-wp-hook.php on line 290 in /home1/wporb/public_html/wp-content/plugins/elementor/includes/template-library/sources/local.php on line 1044
    on_save_post()
    wp-includes/class-wp-hook.php:290
    apply_filters()
    wp-includes/class-wp-hook.php:312
    do_action()
    wp-includes/plugin.php:478
    do_action()
    wp-includes/post.php:4119
    wp_insert_post()
    wp-admin/includes/post.php:671
    get_default_post_to_edit()
    wp-admin/post-new.php:66

Viewing 2 replies - 1 through 2 (of 2 total)
  • Stefan Pejcic

    (@stefanpejcic)

    I’ve just migrated to another hosting and Im getting this error when trying to create a page.
    any thoughts what may be causing this error?

    Plugin Support davidr90

    (@davidr90)

    Hi,

    From the fatal error you’ve shared, there seems to be an underlying issue within this site’s database. The specific error line “on_save_post () must be an instance of WP_Post, null given” points to an issue in the database table structure which is either corrupted or is missing key elements.

    As a quick test, you may try to adding/publishing a post or page normally within WordPress’ default editor with all the plugins (including Elementor) deactivated.

    If you cannot add/publish new posts/pages even with Elementor deactivated, you will need to report this fatal error to your hosting provider to check and resolve any database issues present.

    For quick reference, here are a couple of web articles you may find helpful in possibly repairing a corrupted WordPress database. I’ve also included WordPress’s Database Description article which outlines the various tables, their structure, and necessary field values.

    https://www.maketecheasier.com/fix-corrupted-wordpress-database-2/

    https://www.alexgeorgiou.gr/repair-auto_increment-primary-key-wordpress-mysql/

    https://codex.wordpress.org/Database_Description

    In most cases, if this error occurred after a site migration, this can also happen when the migration is incomplete in ensuring that the entire database and its table structures were copied exactly as they were in the original site. If this was indeed a site migration, you may try another migration tool or take a look at our Site Migration blog article that may help.

    https://elementor.com/blog/site-migration/

    I hope this information helped you solve your issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.