WordPress.org

Make WordPress Core

Opened 19 months ago

Last modified 6 weeks ago

#24869 assigned defect (bug)

"All" in post list table is incorrectly selected in some filtered views

Reported by: enej Owned by: wonderboymusic
Milestone: 4.2 Priority: normal
Severity: minor Version: 3.5.2
Component: Posts, Post Types Keywords: has-patch
Focuses: ui, administration Cc:

Description

When you are viewing the posts table and you have selected an author the all filter is incorrectly selected.

Attachments (5)

Posts_‹_CMS_Dev_—_WordPress.png (153.6 KB) - added by enej 19 months ago.
screenshot
24869.diff (1.1 KB) - added by enej 19 months ago.
patch that removed the selection of all.
24869.2.diff (1.1 KB) - added by rmarks 19 months ago.
This patch includes 24869.diff​ by enej plus adds the cases when a category or tag is specified
24869.alt.diff (1.0 KB) - added by rmarks 19 months ago.
24869.3.diff (1.7 KB) - added by wonderboymusic 6 weeks ago.

Download all attachments as: .zip

Change History (18)

@enej19 months ago

screenshot

@enej19 months ago

patch that removed the selection of all.

comment:1 follow-up: @enej19 months ago

  • Keywords has-patch added; needs-patch removed

This patch should fix it.

@rmarks19 months ago

This patch includes 24869.diff​ by enej plus adds the cases when a category or tag is specified

comment:2 in reply to: ↑ 1 @rmarks19 months ago

  • Cc rmarks@… added
  • Summary changed from "All" in post list is incorectly selected when an author is selected. to "All" in post list is incorectly selected when an author, category, or tag is selected.

Replying to enej:

This patch should fix it.

I added to your patch by including the exceptions when a category or tag was specified.

comment:3 @helen19 months ago

  • Summary changed from "All" in post list is incorectly selected when an author, category, or tag is selected. to "All" in post list table is incorerctly selected in some filtered views

Is there something we can do besides continuing to add to the conditional? For example, as what is probably a TERRIBLE idea, comparing the post count of all vs. the current view.

comment:4 @helen19 months ago

  • Summary changed from "All" in post list table is incorerctly selected in some filtered views to "All" in post list table is incorrectly selected in some filtered views

comment:5 @helen19 months ago

  • Keywords ui-focus added

comment:6 @sworddance19 months ago

@helen - "Is there something we can do besides continuing to add to the conditional?"

An alternative would be to see if the only $_REQUEST parameter is post_type. so something like:

empty($_REQUEST) == 0
count($_REQUEST) == 1 && isset($_REQUESTpost_type?)
Version 0, edited 19 months ago by sworddance (next)

comment:7 @sworddance19 months ago

  • Cc sworddance added

@rmarks19 months ago

comment:8 @rmarks19 months ago

I have just uploaded an alternate diff that accomplishes @enej's intentions while using @sworddance's suggestions.

comment:9 @pauldewouters19 months ago

I tested the patch and can confirm it fixes the issue

comment:10 @pauldewouters19 months ago

  • Cc pauldewouters@… added

comment:11 @jeremyfelt13 months ago

  • Component changed from Administration to Posts, Post Types
  • Focuses admin added

comment:12 @wonderboymusic6 weeks ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from Awaiting Review to 4.2
  • Owner set to wonderboymusic
  • Status changed from new to assigned

I have been in list tables pretty deep recently, I would like to fix this

@wonderboymusic6 weeks ago

comment:13 @wonderboymusic6 weeks ago

  • Keywords has-patch added; needs-patch removed

24869.3.diff fixes this, sorry it sat for so long, enej!

Note: See TracTickets for help on using tickets.