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 | 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
#2
@
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
@
2 years ago
- Component changed from General to Posts, Post Types
- Focuses administration added
- Keywords has-testing-info added
- Version set to 4.2
Test Report
This report validates that the issue can be reproduced and that the patch resolves the issue.
Patch tested: PR 3275
Steps to Reproduce or Test
- Navigate to
Posts
. - Open the
Screen Options
tab and make a change. - 🐞 Click
Apply
. - Apply the patch.
- Refresh the page.
- Additional: Test
Pages
and a custom post type.
Expected Results
When reproducing the issue:
- ❌ The
All
view is not bold.
When testing the patch:
- ✅ The
All
view is bold. - ✅ No regressions detected.
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
When reproducing the issue:
- ✅ The
All
view is not bold. Issue reproduced.
When testing the patch:
- ✅ The
All
view is bold. - ✅ No regressions detected.
- The patch seems to resolve the issue without introducing a regression.
Additional Notes
- This began happening from WordPress 4.2 onwards.
- This may benefit from additional testing for plugins that extend the
WP_Posts_List_Table
class. Addingneeds-testing
until this is done.
Analogous to the
paged
parameter, unsetmode
whet checking whetherthis is the base request for the
\WP_Posts_List_Table
.Trac ticket: https://core.trac.wordpress.org/ticket/56599