Automattic / Automattic/HyperDB

Fatal error: Uncaught Error: Attempt to assign property "post_content"

Open
#134 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
150
Forks
28
PR merge metrics
No merged PRs in 30d

Description

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

```
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!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.