Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#17733 closed defect (bug) (fixed)

Bulk Actions default posts to Draft

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

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
15 years ago

  • Component General → Quick/Bulk Edit
  • Keywords needs-patch added
  • Milestone Awaiting Review → Future Release
  • Severity trivial → 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
15 years ago

Related/duplicate: #17412

#3 @kawauso
15 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
15 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
15 years ago

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

#6 @kawauso
15 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
15 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
15 years ago

  • Milestone Future Release → 3.2
  • Severity major → critical

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

#9 @ocean90
15 years ago

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

#10 @azaozz
15 years ago

  • Owner set to azaozz
  • Resolution → fixed
  • Status new → 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.