Opened 7 years ago
Last modified 6 years ago
#47041 new defect (bug)
Custom Post type author empty
| Reported by: | dipesh.kakadiya | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Posts, Post Types | Version: | 5.1.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | rest-api |
Description
If I created Custom post type with rest enabled [ for Gutenberg support ] and I try to created/publish custom post type then Post author is empty instead of the current user
I checked with bbPress Post type forum, For enabled rest support, refer the following code
function twentyseventeen_rest_support_bbpress() { global $wp_post_types; $forum_post_type = bbp_get_forum_post_type(); if (isset($wp_post_types[$forum_post_type])) { $wp_post_types[ $forum_post_type ]->show_in_rest = true; } } add_action('init', 'twentyseventeen_rest_support_bbpress', 25);
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
There's a matching issue that was created in the Gutenberg repo:
https://github.com/WordPress/gutenberg/issues/17073
I've closed that in favor of this ticket since the logic for setting the author seems to be handled in core (Gutenberg sends no author data).