-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
So currently when you create a Custom Post Type and are using Gutenberg, when a post is saved the post_author field in the database for that post is 0. This does not happen in the classic editor or revisions.
Steps to reproduce
- Create a custom post type using
register_post_type - Create a new post for the new custom post type
- Check database table
*_posts post_authorfield is 0
Confirmed this has been happening in all versions of Gutenberg.
Short term solution
When creating the custom post type make sure to add author is added to supports and this will add the author id to the post.
Because of this we should also update the documentation for Gutenberg when using Custom Post Types.
Long term solution
Because Post and Page automatically add the author id to the post_author column in the database when using Gutenberg, we should also make this happen for Custom Post Types, as this the case with the classic editor.
Let me know if you need anymore information on this.