Opened 5 months ago
Last modified 5 months ago
#63659 new defect (bug)
Adding the "order" or "orderby" query argument to the front page causes the latest news to be displayed
| Reported by: | | Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Query | Keywords: | has-patch has-test-info |
| Focuses: | Cc: |
Description
If the homepage displays a static page, adding "order" or "orderby" GET parameters leads to showing the latest news or, in their absence (in my case), just the header and footer.
I believe that main site settings should be the priority, and these parameters (and any parameters that do not match what is expected) should be ignored.
Related ticket: #45666
Change History (5)
This ticket was mentioned in PR #9185 on WordPress/wordpress-develop by @Presskopp.
5 months ago #1
- Keywords has-patch added
#2
@
5 months ago
Test Report
Patch tested: https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/9185.diff
Steps to Reproduce or Test
- Go to Admin Dashboard > Setting > Reading and set homepage display to a static page and set the
Sample Pageas Homepage as shown in the screenshot https://nimb.ws/eHo4GOC. - Go to https://yoursite.com/ and you can see the Sample Page as home page as shown in the screenshot https://prnt.sc/PI5iaut9IS6V.
- 🐞 Browsing the https://yoursite.com/?order=test URL and the latest posts are displayed as shown in the screenshot https://prnt.sc/CZmuLb0tIX7R.
- 🐞 Browsing the https://yoursite.com/?orderby=test URL and the latest posts are displayed as shown in the screenshot https://prnt.sc/dB8oI_5dXDYM.
Expected Results
When testing a patch to validate that it works as expected:
- ✅ The Sample page should be displayed as the home page.
When reproducing a bug:
- 🐞 The Latest posts are displaying as the home page.
Environment
- WordPress: 6.9-alpha-20250703.144223
- PHP: 7.4.31-dev
- Server: PHP.wasm
- Database: WP_SQLite_Driver (Server: 5.5 / Client: 3.40.1)
- Browser: Chrome 137.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
Actual Results
When reproducing a bug/defect:
- 🐞 The Latest posts are displaying as the home page.
Screenshots:
When testing the bugfix patch:
- ✅ The Sample page is displayed as the home page.
Screenshots:
This ticket was mentioned in Slack in #core-test by pmbaldha. View the logs.
5 months ago
#5
@
5 months ago
Reproduction Report
This report validates that the issue can be reproduced.
Environment
- OS: Windows 10 Build 19045
- Web Server: PHP.wasm
- PHP: 8.0.30-dev
- WordPress: WordPress 6.8.1
- Browser: Chrome Version 137
- Theme: Twenty Twenty-Five 1.2
- Active Plugins:
- None - Fresh Install
Steps to Reproduce
- Create new test site via WP Playground
- Navigate to Settings > Reading
- Update "your homepage displays" setting from "Your latest posts" to "A static page"
- Update "Homepage:" setting to "Sample Page"
- Navigate to root URL - Sample Page is shown
- Navigate to "/?order=test" - latest posts are displayed
- Navigate to "/?orderby=test" - latest posts are displayed
Actual Results
- ✅ Error condition occurs (reproduced).
Trac ticket: https://core.trac.wordpress.org/ticket/63659
While this is working (for me), probably more needs to be done, like setting
$this->is_front_page = true;explicitely etc.