WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#17733 closed defect (bug) (fixed)

Bulk Actions default posts to Draft

Reported by: actionnerd Owned by: azaozz
Milestone: 3.2 Priority: normal
Severity: critical Version: 3.1.3
Component: Quick/Bulk Edit Keywords: needs-patch
Focuses: Cc:

Description

Very trivial but wanted to mention it as it did provide an unexpected result during a client meeting.

Steps to reproduce bug:
Select the checkbox of a few posts in the post/page list in the Wordpress Admin area.
Change the "Bulk Actions" drop down to "Edit" (but do not hit "Apply").
Change the "Show all dates" drop down to any month and select Filter.

Instead of filtering by date, it'll update the selected posts to Draft mode.

Able to reproduce across several installs, with and without plugins and the default theme activated.

Change History (10)

#1 @ocean90
10 years ago

  • Component changed from General to Quick/Bulk Edit
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Severity changed from trivial to major

Reproduced with trunk. With WP_DEBUG true I get this messages:

Notice: Undefined index: _status in /wp-admin/includes/post.php on line 284

Notice: Undefined index: _status in /wp-admin/includes/post.php on line 288

#2 @kawauso
10 years ago

Related/duplicate: #17412

#3 @kawauso
10 years ago

This occurs even if nothing is set as the filter, it's just having the Bulk Edit open when filtering that causes it.

#4 @nacin
10 years ago

Yuck.

Any attempt on a patch?

Sounds like maybe we're just not checking which submit button was pressed when trying to save bulk edit?

#5 @actionnerd
10 years ago

Sorry about that! I did a search but nothing came up — probably cause #17412 is a bit sparse on details :)

#6 @kawauso
10 years ago

Yeah, just threw it up here so it can be closed, probably in favour of this to be honest.

The bug is actually present for all Bulk Edit actions across all list tables that have Bulk Edit and Filter as far as I can tell.

#7 @azaozz
10 years ago

Looks like another rare regression. If there's a bulk edit open and the user clicks on a filter, the bulk edit should close before submitting the form. That's how it used to work when we introduced it (I think). Also checking which button was clicked to submit the form is a good idea.

#8 @nacin
10 years ago

  • Milestone changed from Future Release to 3.2
  • Severity changed from major to critical

I don't like the idea of content destruction. Moving to 3.2 and bumping severity.

#9 @ocean90
10 years ago

Patch from #15761 needs some refresh, but it works for me.

#10 @azaozz
10 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In [18222]:

Do not run bulk edit when the user clicks on a filter, fixes #17733

Note: See TracTickets for help on using tickets.