Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#56599 new defect (bug)

"All" view not selected for all relevant views for custom post type

Reported by: alpipego's profile alpipego Owned by:
Milestone: Awaiting Review Priority: normal
Severity: trivial Version: 4.2
Component: Posts, Post Types Keywords: has-patch has-testing-info needs-testing
Focuses: administration Cc:

Description

When the screen options get saved, the parameter mode=list gets appended to the URL. For the posts table, the “All” view gets the .current HTML class, since \WP_Posts_List_Table::is_base_request() returns true. For all other post types—including pages—it returns false.

Change History (4)

This ticket was mentioned in PR #3275 on WordPress/wordpress-develop by alpipego.


2 years ago
#1

  • Keywords has-patch added

Analogous to the paged parameter, unset mode whet checking whether
this is the base request for the \WP_Posts_List_Table.

Trac ticket: https://core.trac.wordpress.org/ticket/56599

#2 @alpipego
2 years ago

We noticed the same happens for order and orderby—even for the posts table. I have updated the patch to consider order and orderby as well.

#3 @costdev
2 years ago

  • Component changed from General to Posts, Post Types
  • Focuses administration added
  • Keywords has-testing-info added
  • Version set to 4.2

Reproduction Report

This report validates that the issue can be reproduced.

Steps to Reproduce or Test

  1. Navigate to Posts.
  2. Open the Screen Options tab and make a change.
  3. 🐞 Click Apply.

Expected Results

  • ❌ The All view is not bold.

Environment

  • OS: Windows 10
  • Web Server: Apache (WSL2 - Ubuntu)
  • PHP: 7.4
  • WordPress: 6.1-alpha-54198
  • Browser: Chrome 105.0.5195.125
  • Theme: Twenty Twenty-Two
  • Active Plugins: None activated.

Actual Results

  • ✅ The All view is not bold. Issue reproduced.

Additional Notes

  • This began happening from WordPress 4.2 onwards.
Version 1, edited 2 years ago by costdev (previous) (next) (diff)

#4 @costdev
2 years ago

  • Keywords needs-testing added

Per notes in the test report above:

This may benefit from additional testing for plugins that extend the WP_Posts_List_Table class. Adding needs-testing until this is done.

Note: See TracTickets for help on using tickets.