Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#27792 closed defect (bug) (fixed)

edit multiple posts of different authors, authornames will change

Reported by: mischademuynck Owned by: nacin
Priority: highest omg bbq Milestone: 3.8.3
Component: Quick/Bulk Edit Version: 3.8.2
Severity: blocker Keywords: has-patch needs-testing
Cc: Focuses:

Description

WP 3.8.2

I have multiple authors on my blog. Every week the posts get a tag with a weeknumber. Some authors forget, so weekly I check on this and 'bulk edit' the tags.
Now I saw a bug. When I make a change on multiple posts the author gets changed for all selected posts. I only change tags here. I made sure the author is not changed.

Regards,
Mischa de Muynck (www.3x50.nl)

Attachments (4)

27792.diff​ (1.0 KB ) - added by nacin 13 years ago.
Untested
27792.2.diff​ (2.3 KB ) - added by dd32 13 years ago.
untested & reverts [27990] since it's not needed with this approach, revert is 100% optional
27792.3.diff​ (1.2 KB ) - added by nacin 13 years ago.
27792.4.diff​ (3.1 KB ) - added by DrewAPicture 13 years ago.
+ unit tests

Download all attachments as: .zip

Change History (13)

#1 @nacin
13 years ago

  • Component General → Quick/Bulk Edit
  • Milestone Awaiting Review → 3.8.3
  • Priority normal → highest omg bbq
  • Severity normal → blocker

Confirmed.

@nacin
13 years ago

Untested

#2 @DrewAPicture
13 years ago

  • Keywords has-patch added

27792.diff​ fixes it for me on both 3.8.2 and trunk.

#3 @SergeyBiryukov
13 years ago

Introduced in [27964], partially fixed in [27990] (but not for comment_status, ping_status, or post_author).

@dd32
13 years ago

untested & reverts [27990] since it's not needed with this approach, revert is 100% optional

#4 @dd32
13 years ago

27792.2.diff​ is a alternate approach to prevent this ever happening again in the future, it resets $post_data on every iteration of the posts loop.
It reverts [27990] simply due to my working copy being out of date, but that commit is optional with this approach anyway.

It seems likely this could happen again in the future since so much in that loop already modified $post_data, resetting it early just seems like a saner solution that fighting these issues..

#5 @dd32
13 years ago

  • Keywords needs-testing added

I've tested my patch, and twisting it every which way that I can think of, and I can't see anything broken afterwards.

Then again, the breaking originated in my code in the first place, so I'd appreciate others eyes on it!

Nacins patch here also appears to work, and fixes this specific problem.

#6 @DrewAPicture
13 years ago

27792.4.diff​ adds unit tests for the post_author, comment_status, and ping_status post fields following a bulk edit.

#7 @nacin
13 years ago

  • Owner set to nacin
  • Resolution → fixed
  • Status new → closed

In 28113:

Avoid stomping of bulk postdata inside the bulk_edit_posts() loop.

Reverts [27990] which did not fix it for authors and comment/ping status.

props dd32, DrewAPicture.
fixes #27792.

#8 @nacin
13 years ago

In 28114:

Avoid stomping of bulk postdata inside the bulk_edit_posts() loop.

Merge [28113] to the 3.8 branch.

Reverts [27991] which did not fix it for authors and comment/ping status.

props dd32, DrewAPicture.
fixes #27792.

#9 @nacin
13 years ago

In 28115:

Avoid stomping of bulk postdata inside the bulk_edit_posts() loop.

Merges [28113] to the 3.7 branch.

Reverts [27992] which did not fix it for authors and comment/ping status.

props dd32, DrewAPicture.
fixes #27792.

Note: See TracTickets for help on using tickets.