Opened 14 years ago
Closed 12 years ago
#16645 closed defect (bug) (fixed)
Inline edit defaults author to current user
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.7 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Quick/Bulk Edit | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
This one looks a bit like ticket #13982
Here is what happens :
- I have created a custom post type that doesn't support the 'author' when registering it (with register_post_type)
- I am doing an inline edit of a custom post authored by another user
- the custom post author defaults to current user (ie the one who is performing the inline edit instead of the one who authored it)
This behavior is different from what you see with post type of post where inline edit wouldn't change the post author.
To debug it further, I have enabled the 'author' during the custom post type registration and the problem isn't there anymore in that case. So it is probably linked to the fact that 'author' wasn't entered in the supports array entry during the custom post type registration.
I am not sure if this is a bug or expected behavior but it would be nice to be able to have a common behavior accross post types weither 'author' is supported or not.
Attachments (4)
Change History (15)
#2
in reply to:
↑ 1
;
follow-up:
↓ 3
@
14 years ago
Replying to knutsp:
It seems logical that a CPT without author support may have an author silently set in the database, and the quick edit should respect this.
Agreed. Don't think this is a regression over 3.0 though, is it?
#3
in reply to:
↑ 2
@
14 years ago
- Keywords has-patch added
Replying to nacin:
Agreed. Don't think this is a regression over 3.0 though, is it?
Seems to be a regression. This line exists in both 3.0 and 3.1, which causes this issue.
#4
follow-up:
↓ 5
@
14 years ago
Doesn't sound like a regression then -- custom post types (with a UI) were only introduced in 3.0.
#5
in reply to:
↑ 4
@
14 years ago
Replying to nacin:
Doesn't sound like a regression then -- custom post types (with a UI) were only introduced in 3.0.
Right, my bad, I was confused.
#9
@
12 years ago
16645.patch is another approach. It adds a hidden field for post_author
if the post type doesn't support authors.
I can confirm this. Had a few CPTs without author support. In the content table for the CPT the correct author showed, but after quick editing I was the suddenly the author of the content.
This became so confusing and that I had to re-enable author on the CPTs, at least to be able to correct it using the normal editor.
It seems logical that a CPT without author support may have an author silently set in the database, and the quick edit should respect this.