Title: Can&#8217;t create new posts/pages (PHP-problem?)
Last modified: November 4, 2021

---

# Can’t create new posts/pages (PHP-problem?)

 *  Resolved [romc2016](https://wordpress.org/support/users/romc2016/)
 * (@romc2016)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/cant-create-new-posts-pages-php-problem/)
 * I have set up a new XAMPP environment (PHP 8.0.10) in out company intranet for
   my multisite. Everything seemed to work perfectly. I have now notices, that I
   cannot create new posts/pages. I get the following error messages (see below).
 * I also get messages like this when useing drop-down forms in my theme:
    “Deprecated:
   attribute_escape ist seit Version 2.8.0 veraltet! Benutze stattdessen esc_attr().
   in D:\xampp\htdocs\wp-includes\functions.php on line 5211”
 * What I tried so far:
    – completely new install of WordPress (Version 5.8.1) –
   using an older backup of the database – different browsers – restarting XAMPP
 * I suspect it is a problem with the PHP version?
 * Any help would be greatly appreciated! Thanks!
 * Roman
 *     ```
       Warning: Attempt to read property "post_type" on null in D:\xampp\htdocs\wp-includes\post.php on line 7358
   
       Warning: Attempt to read property "post_type" on null in D:\xampp\htdocs\wp-includes\post.php on line 7359
   
       Warning: Attempt to read property "ID" on null in D:\xampp\htdocs\wp-includes\post.php on line 7363
   
       Warning: Attempt to read property "post_type" on null in D:\xampp\htdocs\wp-includes\post.php on line 7605
   
       Warning: Attempt to read property "post_type" on null in D:\xampp\htdocs\wp-includes\theme.php on line 3421
   
       Warning: Attempt to read property "post_type" on null in D:\xampp\htdocs\wp-includes\ms-blogs.php on line 799
   
       Warning: Attempt to read property "post_type" on null in D:\xampp\htdocs\wp-includes\theme.php on line 3645
   
       Warning: Attempt to read property "post_type" on null in D:\xampp\htdocs\wp-includes\post.php on line 5148
   
       Warning: Attempt to read property "ID" on null in D:\xampp\htdocs\wp-includes\post.php on line 5148
   
       Warning: Attempt to read property "post_type" on null in D:\xampp\htdocs\wp-includes\post.php on line 4457
   
       Fatal error: Uncaught Error: Attempt to assign property "post_content" on null in D:\xampp\htdocs\wp-admin\includes\post.php:736 Stack trace: #0 D:\xampp\htdocs\wp-admin\post-new.php(66): get_default_post_to_edit('post', true) #1 {main} thrown in D:\xampp\htdocs\wp-admin\includes\post.php on line 736
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/cant-create-new-posts-pages-php-problem/#post-15037427)
 * This may be a plugin or theme conflict. Please attempt to disable all plugins,
   and use one of the default (Twenty*) themes. If the problem goes away, enable
   them one by one to identify the source of your troubles.
 * If you can install plugins, install and activate “Health Check”: [https://wordpress.org/plugins/health-check/](https://wordpress.org/plugins/health-check/)
   
   It will add some additional features under the menu item under Tools > Site Health.
   On its troubleshooting tab, you can Enable Troubleshooting Mode. This will disable
   all plugins, switch to a standard WordPress theme (if available), allow you to
   turn your plugins on and off and switch between themes, **without affecting normal
   visitors to your site**. This allows you to test for various compatibility issues.
   There’s a more detailed description about how to use the Health Check plugin 
   and its Troubleshooting Mode at [https://make.wordpress.org/support/handbook/appendix/troubleshooting-using-the-health-check/](https://make.wordpress.org/support/handbook/appendix/troubleshooting-using-the-health-check/)
 *  Thread Starter [romc2016](https://wordpress.org/support/users/romc2016/)
 * (@romc2016)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/cant-create-new-posts-pages-php-problem/#post-15037537)
 * Hi t-p
 * thank you for your answer. Unfortunately It didn’t solve the issue.
 * I tried the following:
    – disable all plug-ins – using Twenty-Twenty (and others)
   as theme – renaming the plug-ins folder to make sure they are all disabled – 
   completely new install of XAMPP with PHP 7.4.25 – trying the “Health-Check” plug-
   in. It tells me the site is in good health. Itonly tells me that imagick isn’t
   installed and that I don’t use https, which is ok, since it’s only on the intranet.
   I also checked the data integrity, which is good. – I turned on Truble Shooting
   mode – I turned off debug mode (which I had turned on to figure out what’s wrong…)
 * When I try to create a post with Debug Mode off I get the following message:
 * Warning: Creating default object from empty value in D:\xampp\htdocs\wp-admin\
   includes\post.php on line 736
 * If I try it with Debog Mode on, I get the following messages:
 *     ```
       Notice: Trying to get property 'post_type' of non-object in D:\xampp\htdocs\wp-includes\post.php on line 7358
   
       Notice: Trying to get property 'post_type' of non-object in D:\xampp\htdocs\wp-includes\post.php on line 7359
   
       Notice: Trying to get property 'ID' of non-object in D:\xampp\htdocs\wp-includes\post.php on line 7363
   
       Notice: Trying to get property 'post_type' of non-object in D:\xampp\htdocs\wp-includes\post.php on line 7605
   
       Notice: Trying to get property 'post_type' of non-object in D:\xampp\htdocs\wp-includes\theme.php on line 3421
   
       Notice: Trying to get property 'post_type' of non-object in D:\xampp\htdocs\wp-includes\ms-blogs.php on line 799
   
       Notice: Trying to get property 'post_type' of non-object in D:\xampp\htdocs\wp-includes\theme.php on line 3645
   
       Notice: Trying to get property 'post_type' of non-object in D:\xampp\htdocs\wp-includes\post.php on line 5148
   
       Notice: Trying to get property 'ID' of non-object in D:\xampp\htdocs\wp-includes\post.php on line 5148
   
       Notice: Trying to get property 'post_type' of non-object in D:\xampp\htdocs\wp-includes\post.php on line 4457
   
       Warning: Creating default object from empty value in D:\xampp\htdocs\wp-admin\includes\post.php on line 736
   
       Notice: Undefined property: stdClass::$ID in D:\xampp\htdocs\wp-admin\post-new.php on line 67
   
       Notice: Undefined property: stdClass::$post_status in D:\xampp\htdocs\wp-admin\edit-form-blocks.php on line 82
   
       Notice: Undefined property: stdClass::$post_type in D:\xampp\htdocs\wp-admin\includes\meta-boxes.php on line 1426
   
       Notice: Undefined property: stdClass::$post_type in D:\xampp\htdocs\wp-includes\taxonomy.php on line 245
   
       Notice: Undefined property: stdClass::$post_type in D:\xampp\htdocs\wp-includes\taxonomy.php on line 248
   
       Notice: Trying to get property 'labels' of non-object in D:\xampp\htdocs\wp-admin\includes\meta-boxes.php on line 1502
   
       Notice: Trying to get property 'attributes' of non-object in D:\xampp\htdocs\wp-admin\includes\meta-boxes.php on line 1502
   
       Notice: Undefined property: stdClass::$post_type in D:\xampp\htdocs\wp-admin\edit-form-blocks.php on line 278
       ```
   
 *  Thread Starter [romc2016](https://wordpress.org/support/users/romc2016/)
 * (@romc2016)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/cant-create-new-posts-pages-php-problem/#post-15037560)
 * I have now set up a completely new blog in a sub directory of the original blog(
   same XAMPP/PHP/MariaDB-installation but new db). I just created a folder “/test”,
   copied a fresh copy of wordpress into it, configured the wp-config-File and voilà,
   this works fine. I guess I will have to set it all up new over the weekend and
   migrate the 13 sites…
 * It will be a lot of work but at least I know how I can potentially solve the 
   issue.
 * Thanks never the less! I’m still open to ideas! 🙂
 * kind regards
 * Roman
 *  Thread Starter [romc2016](https://wordpress.org/support/users/romc2016/)
 * (@romc2016)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/cant-create-new-posts-pages-php-problem/#post-15037596)
 * Quick update with additional info: the weird error messages I got inside of dropdown
   menus and text field forms within my themes were definitely a problem with PHP
   8. With the switch to PHP 7.4 the just vanished.
 * Example of an error message (sorry German): “Deprecated: attribute_escape ist
   seit Version 2.8.0 veraltet! Benutze stattdessen esc_attr(). in D:\xampp\htdocs\
   wp-includes\functions.php on line 5211”
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/cant-create-new-posts-pages-php-problem/#post-15037645)
 * Glad its sorted 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Can’t create new posts/pages (PHP-problem?)’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/cant-create-new-posts-pages-php-problem/#post-15037645)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
