• Hello,

    I have a WP network site. I am getting the below error when trying to create a new post. I am using the latest HyperDB from this repo.

    Fatal error: Uncaught Error: Attempt to assign property "post_content" on null in /var/www/wp-admin/includes/post.php:762 Stack trace: #0 /var/www/wp-admin/post-new.php(66): get_default_post_to_edit() #1 {main} thrown in /var/www/wp-admin/includes/post.php on line 762 
    

    Configuration of db-config.php

    <?php
    /**
     * Register the primary server to HyperDB
     */
    $wpdb->add_database( array(
            'host'     => 'xxx',
            'user'     => 'xxx',
            'password' => 'xxx',
            'name'     => 'xxx',
            'write'    => 1, // primary server takes write queries
            'read'     => 0,
    
    ) );
    
    $wpdb->add_database( array(
            'host'     => 'localhost',
            'user'     => 'xxx',
            'password' => 'xxx',
            'name'     => 'xxx',
            'write'    => 0, 
            'read'     => 1, // read from local replica server
    
    ) );

    Please help! Thank you!

  • The topic ‘Fatal error: Uncaught Error: Attempt to assign property “post_content”’ is closed to new replies.