We have a custom plugin we have created for a customer, it simply configures a custom post type.
They upgraded to wp 4.4 today. Now that custom post type is the only one that you cannot add a new post for.I can edit a custom post with out issue and I can add the standard posts and other custom post types created with a third party plugin.
I have uploaded the plugin to a clean install of 4.4 with a default theme and it still has the issue.
My custom post has the capabilities of 'post'. All I get once logged in is "Submit for Review". If you fill out the form and click the "submit for review" button then you get the message "You are not allowed to edit this post."
Here is the custom post declaration:
$args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => plugins_url( 'images/image.png', __FILE__ ), 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('') ); register_post_type( 'new_post_type' , $args );
I have double checked the DB has the right primary keys and auto increment too.
I have even tried creating new users and I have installed plugins to check the role capabilities which all look fine.
Any thoughts on how to diagnose?
Update I believe that the capabilities are correct. After changing core WordPress file to retrieve the post type via query string rather than the blank new post object it passes around the correct info appeared.
The problem seems to be when you click the add new button in the main navigation WordPress creates a blank post in the DB, this does not persist for some reason. As a result I get a post id of 0 returned rather than the next incremented id I should have.
This means that when it tries to pull out the meta info for id 0 it does not have the post type it is returned as '', therefore when it tries to get the capabilities for '' it fails and puts the form into the simplest view "submit for review".