#47181 closed defect (bug) (invalid)
Custom post type meta won't save in new editor for user role Author
Reported by: | Guido07111975 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.2 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description
Hi,
When using the new editor as author I've noticed the custom post type meta fields aren't being saved. Admin and editor don't have this problem. Also classic editor works as expected.
More info can be found in [this thread]https://wordpress.org/support/topic/custom-post-meta-not-saved-for-author/
Have created a tiny example plugin for testing purposes, which can be found [here]http://www.webmastergroningen.nl/wordpress/cpt-plugin/
Guido
Change History (6)
#2
@
5 years ago
After trying different capabilities, I narrowed it down to edit_others_posts. If I add that to the author role, $_POST comes through unscathed to my save meta data function, and things work as as desired.
Of course, that causes a bunch of other problems (like authors being able to edit others' posts), but maybe can help narrow down where the problem is in the WP code.
I'm having the same problem. For editor and above, my code to check and save metadata works as desired. For author, the basic post data is saved, but by the time my save_tour_fields_meta() function is called, $_POST is empty.
The capabilities for author vs. editor are below. I've removed delete_published_posts and moderate_comments from the author role. I tried it without removing those, but still no joy.