Opened 2 years ago

Last modified 2 years ago

#16645 new defect (bug)

Inline edit defaults author to current user

Reported by: firebird75 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Quick/Bulk Edit Version: 3.1
Severity: normal Keywords: has-patch
Cc: autremonde75@…, knut@…

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 (1)

16645.diff (783 bytes) - added by garyc40 2 years ago.
don't modify author unless specifically told to do so

Download all attachments as: .zip

Change History (6)

comment:1 follow-up: ↓ 2   knutsp2 years ago

  • Cc knut@… added

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.

comment:2 in reply to: ↑ 1 ; follow-up: ↓ 3   nacin2 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?

garyc402 years ago

don't modify author unless specifically told to do so

comment:3 in reply to: ↑ 2   garyc402 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.

comment:4 follow-up: ↓ 5   nacin2 years ago

Doesn't sound like a regression then -- custom post types (with a UI) were only introduced in 3.0.

comment:5 in reply to: ↑ 4   garyc402 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.

Note: See TracTickets for help on using tickets.