#27556 closed defect (bug) (wontfix)
Saving a post doesn't notify a user if the post has been correctly saved
Reported by: | frosso | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8.1 |
Component: | Posts, Post Types | Keywords: | needs-patch bulk-reopened |
Focuses: | administration | Cc: |
Description
I had a post with a custom template attached to it.
Then we disabled users ability to assign custom templates.
Then we deleted the custom template from the filesystem.
Every time we tried to save the post with the non-existing template, wordpress notified us that the post was correctly saved, but it actually failed saving all the meta boxes inputs.
Change History (8)
#4
@
10 years ago
Yeah, but debugging a bit I found out it was due to line 2943 in wp-includes/post.php, the condition
'default' != $page_template && ! isset( $page_templates[ $page_template ] )
returns true (since the template is not 'default').
#5
follow-up:
↓ 6
@
10 years ago
I had a post with a custom template attached to it.
Did you mean a page or a custom post type? Custom templates are currently only available for pages, see #18375.
Then we disabled users ability to assign custom templates.
How exactly did you do that?
The Template dropdown in Page Attributes meta box doesn't seem to be controlled by a user capability, only by the actual presence of custom templates: tags/3.8.1/src/wp-admin/includes/meta-boxes.php#L659.
The meta box, however, depends on whether the post type supports page-attributes
:
tags/3.8.1/src/wp-admin/edit-form-advanced.php#L163.
#6
in reply to:
↑ 5
@
10 years ago
Replying to SergeyBiryukov:
I had a post with a custom template attached to it.
Did you mean a page or a custom post type? Custom templates are currently only available for pages, see #18375.
Yes, I meant a page, sorry for the confusion
Then we disabled users ability to assign custom templates.
How exactly did you do that?
The Template dropdown in Page Attributes meta box doesn't seem to be controlled by a user capability, only by the actual presence of custom templates: tags/3.8.1/src/wp-admin/includes/meta-boxes.php#L659.
The meta box, however, depends on whether the post type supports
page-attributes
:
tags/3.8.1/src/wp-admin/edit-form-advanced.php#L163.
By using this function call on the 'init' action
remove_post_type_support( 'page', 'page-attributes' );
I found someone with a similar issue #17115