Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#27792 closed defect (bug) (fixed)

edit multiple posts of different authors, authornames will change

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

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 11 years ago.
Untested
27792.2.diff (2.3 KB) - added by dd32 11 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 11 years ago.
27792.4.diff (3.1 KB) - added by DrewAPicture 11 years ago.
+ unit tests

Download all attachments as: .zip

Change History (13)

#1 @nacin
11 years ago

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

Confirmed.

@nacin
11 years ago

Untested

#2 @DrewAPicture
11 years ago

  • Keywords has-patch added

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

#3 @SergeyBiryukov
11 years ago

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

@dd32
11 years ago

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

#4 @dd32
11 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
11 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.

@nacin
11 years ago

@DrewAPicture
11 years ago

+ unit tests

#6 @DrewAPicture
11 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
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to 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
11 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
11 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.