Opened 3 years ago
Last modified 3 weeks ago
#56599 new defect (bug)
"All" view not selected for all relevant views for custom post type
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | trivial | Version: | 4.2 |
| Component: | Posts, Post Types | Keywords: | has-patch has-test-info |
| 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 (9)
This ticket was mentioned in PR #3275 on WordPress/wordpress-develop by alpipego.
3 years ago
#1
- Keywords has-patch added
#2
@
3 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
@
3 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 Optionstab and make a change. - 🐞 Click
Apply. - Apply the patch.
- Refresh the page.
- Additional: Test
Pagesand a custom post type.
Expected Results
When reproducing the issue:
- ❌ The
Allview is not bold.
When testing the patch:
- ✅ The
Allview 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
Allview is not bold. Issue reproduced.
When testing the patch:
- ✅ The
Allview 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_Tableclass. Addingneeds-testinguntil this is done.
#4
@
3 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_Tableclass. Addingneeds-testinguntil this is done.
This ticket was mentioned in PR #8056 on WordPress/wordpress-develop by @alpipego.
14 months ago
#5
Analogous to the paged parameter, unset mode whet checking whether this is the base request for the \WP_Posts_List_Table.
https://core.trac.wordpress.org/ticket/56599
Trac ticket:
#6
@
14 months ago
After accidentally closing the old PR, I have created a new one and rebased it on the current trunk.
This ticket was mentioned in Slack in #core-test by tejwanihemant. View the logs.
14 months ago
#9
@
3 weeks ago
- Keywords needs-testing removed
Patch Testing Report
Patch Tested: https://github.com/WordPress/wordpress-develop/pull/8056
Environment
- WordPress: 7.0-alpha-61215-src
- PHP: 8.2.30
- Server: nginx/1.29.4
- Database: mysqli (Server: 9.5.0 / Client: mysqlnd 8.2.30)
- Browser: Chrome 143.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Test Custom Post Type 1.0
- Test Reports 1.2.1
Steps taken
- Navigate to Posts → All Posts.
- Open the Screen Options panel.
- Change any option (e.g. number of items per page).
- Click Apply.
- Observe the “All” view state before applying the patch.
- Apply the patch from PR.
- Refresh the page.
- Repeat the same steps for:
- Pages
- Custom Post Type (Test)
- ✅ Patch is solving the problem
Expected result
- Before applying the patch:
- ❌ The “All” view is not highlighted (not bold) for Pages and Custom Post Types.
- After applying the patch:
- ✅ The “All” view is correctly highlighted (bold) for Posts, Pages, and Custom Post Types.
- ✅ No regressions observed.
Screenshots/Screencast with results
- Single video demonstrating behavior before and after patch application: https://gofile.io/d/1VXNYP
Analogous to the
pagedparameter, unsetmodewhet checking whetherthis is the base request for the
\WP_Posts_List_Table.Trac ticket: https://core.trac.wordpress.org/ticket/56599