• Hi Guys,

    For the first time, I have a fatal error when I want to add a new page win WordPress. All my plugins et WordPress are uptodate. Theme : Ocean WP.

    Have you got a solution nor an idea ?

    Fatal error: Uncaught TypeError: Elementor\TemplateLibrary\Source_Local::on_save_post(): Argument #2 ($post) must be of type WP_Post, null given, called in /home/cflozannwh/www/wp-includes/class-wp-hook.php on line 312 and defined in /home/cflozannwh/www/wp-content/plugins/elementor/includes/template-library/sources/local.php:1113 Stack trace: #0 /home/cflozannwh/www/wp-includes/class-wp-hook.php(312): Elementor\TemplateLibrary\Source_Local->on_save_post(0, NULL) #1 /home/cflozannwh/www/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(0, Array) #2 /home/cflozannwh/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /home/cflozannwh/www/wp-includes/post.php(4751): do_action(‘save_post’, 0, NULL, false) #4 /home/cflozannwh/www/wp-admin/includes/post.php(745): wp_insert_post(Array, false, false) #5 /home/cflozannwh/www/wp-admin/post-new.php(66): get_default_post_to_edit(‘page’, true) #6 {main} thrown in?/home/cflozannwh/www/wp-content/plugins/elementor/includes/template-library/sources/local.php?on line?1113

Viewing 6 replies - 1 through 6 (of 6 total)
  • i have disabled all plugins and all themes but it’s the same for me. The table wp_post create duplicate entry with id “0”. I think that’s the problem is that

    Plugin Support Joel

    (@joelsm)

    Hi there,

    Thanks for reaching us.

    From the error you’ve shared, we have investigated and determined 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 that is either corrupted or is missing key elements.

    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.

    Note: If you are an Elementor Pro user, please use our dedicated Pro support. To expedite assistance, kindly connect with us through your ‘My Elementor‘ account, and we’ll prioritize resolving your concern swiftly. Please note that as per www.remarpro.com guidelines, commercial product support isn’t provided on this platform.?
    Kind Regards,

    Thank you very much for your return.

    I did all this recommendations and it’s the same problem.

    -- Starting with mod896_users
    
    DELETE FROM mod896_users WHERE ID = 0;
    
    ALTER TABLE mod896_users ADD KEY user_login_key (user_login);
    
    ALTER TABLE mod896_users ADD KEY user_nicename (user_nicename);
    
    ALTER TABLE mod896_users ADD KEY user_email (user_email);
    
    ALTER TABLE mod896_users MODIFY ID bigint(20) unsigned NOT NULL auto_increment;
    
    -- Starting with mod896_usermeta
    
    DELETE FROM mod896_usermeta WHERE umeta_id = 0;
    
    ALTER TABLE mod896_usermeta ADD KEY user_id (user_id);
    
    ALTER TABLE mod896_usermeta ADD KEY meta_key (meta_key(191));
    
    ALTER TABLE mod896_usermeta MODIFY umeta_id bigint(20) unsigned NOT NULL auto_increment;
    
    -- Starting with mod896_posts
    
    DELETE FROM mod896_posts WHERE ID = 0;
    
    ALTER TABLE mod896_posts ADD KEY post_name (post_name(191));
    
    ALTER TABLE mod896_posts ADD KEY type_status_date (post_type,post_status,post_date,ID);
    
    ALTER TABLE mod896_posts ADD KEY post_parent (post_parent);
    
    ALTER TABLE mod896_posts ADD KEY post_author (post_author);
    
    ALTER TABLE mod896_posts MODIFY ID bigint(20) unsigned NOT NULL auto_increment;
    
    -- Starting with mod896_comments
    
    DELETE FROM mod896_comments WHERE comment_ID = 0;
    
    ALTER TABLE mod896_comments ADD KEY comment_post_ID (comment_post_ID);
    
    ALTER TABLE mod896_comments ADD KEY comment_approved_date_gmt (comment_approved,comment_date_gmt);
    
    ALTER TABLE mod896_comments ADD KEY comment_date_gmt (comment_date_gmt);
    
    ALTER TABLE mod896_comments ADD KEY comment_parent (comment_parent);
    
    ALTER TABLE mod896_comments ADD KEY comment_author_email (comment_author_email(10));
    
    ALTER TABLE mod896_comments MODIFY comment_ID bigint(20) unsigned NOT NULL auto_increment;
    
    -- Starting with mod896_links
    
    DELETE FROM mod896_links WHERE link_id = 0;
    
    ALTER TABLE mod896_links ADD KEY link_visible (link_visible);
    
    ALTER TABLE mod896_links MODIFY link_id bigint(20) unsigned NOT NULL auto_increment;
    
    -- Starting with mod896_options
    
    DELETE FROM mod896_options WHERE option_id = 0;
    
    ALTER TABLE mod896_options ADD UNIQUE KEY option_name (option_name);
    
    ALTER TABLE mod896_options ADD KEY autoload (autoload);
    
    ALTER TABLE mod896_options MODIFY option_id bigint(20) unsigned NOT NULL auto_increment;
    
    -- Starting with mod896_postmeta
    
    DELETE FROM mod896_postmeta WHERE meta_id = 0;
    
    ALTER TABLE mod896_postmeta ADD KEY post_id (post_id);
    
    ALTER TABLE mod896_postmeta ADD KEY meta_key (meta_key(191));
    
    ALTER TABLE mod896_postmeta MODIFY meta_id bigint(20) unsigned NOT NULL auto_increment;
    
    -- Starting with mod896_terms
    
    DELETE FROM mod896_terms WHERE term_id = 0;
    
    ALTER TABLE mod896_terms ADD KEY slug (slug(191));
    
    ALTER TABLE mod896_terms ADD KEY name (name(191));
    
    ALTER TABLE mod896_terms MODIFY term_id bigint(20) unsigned NOT NULL auto_increment;
    
    -- Starting with mod896_term_taxonomy
    
    DELETE FROM mod896_term_taxonomy WHERE term_taxonomy_id = 0;
    
    ALTER TABLE mod896_term_taxonomy ADD UNIQUE KEY term_id_taxonomy (term_id,taxonomy);
    
    ALTER TABLE mod896_term_taxonomy ADD KEY taxonomy (taxonomy);
    
    ALTER TABLE mod896_term_taxonomy MODIFY term_taxonomy_id bigint(20) unsigned NOT NULL auto_increment;
    
    -- Starting with mod896_term_relationships
    
    DELETE FROM mod896_term_relationships WHERE object_id = 0;
    
    DELETE FROM mod896_term_relationships WHERE term_taxonomy_id = 0;
    
    ALTER TABLE mod896_term_relationships ADD KEY term_taxonomy_id (term_taxonomy_id);
    
    -- Starting with mod896_termmeta
    
    DELETE FROM mod896_termmeta WHERE meta_id = 0;
    
    ALTER TABLE mod896_termmeta ADD KEY term_id (term_id);
    
    ALTER TABLE mod896_termmeta ADD KEY meta_key (meta_key(191));
    
    ALTER TABLE mod896_termmeta MODIFY meta_id bigint(20) unsigned NOT NULL auto_increment;
    
    -- Starting with mod896_commentmeta
    
    DELETE FROM mod896_commentmeta WHERE meta_id = 0;
    
    ALTER TABLE mod896_commentmeta ADD KEY comment_id (comment_id);
    
    ALTER TABLE mod896_commentmeta ADD KEY meta_key (meta_key(191));
    
    ALTER TABLE mod896_commentmeta MODIFY meta_id bigint(20) unsigned NOT NULL auto_increment;

    The same issue for me with Elementor Beta. I have created a ticket for OVH to ask them if they can do something with the database.

    yes, if I have a solution, I will write here ??

    Plugin Support Joel

    (@joelsm)

    Hi there,

    As I mentioned, it is a database-related error. Anyway, Elementor Beta versions are considered unstable. Please try to roll back to a previous stable version in both those plugins. Tutorial:?Revert To Release From Developer Edition.

    If, after the rollback, you have continued to experience the same issue, try to use the WP-Sweep plugin to clear the database.?

    Have a fantastic day/evening.

    Kind Regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I am not able to create new pages in worpress due to an elementor error’ is closed to new replies.