Make WordPress Core

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: oglekler's profile oglekler 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

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.

#2 @pmbaldha
5 months ago

Test Report

Patch tested: https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/9185.diff

Steps to Reproduce or Test

  1. Go to Admin Dashboard > Setting > Reading and set homepage display to a static page and set the Sample Page as Homepage as shown in the screenshot https://nimb.ws/eHo4GOC.
  2. Go to https://yoursite.com/ and you can see the Sample Page as home page as shown in the screenshot https://prnt.sc/PI5iaut9IS6V.
  3. 🐞 Browsing the https://yoursite.com/?order=test URL and the latest posts are displayed as shown in the screenshot https://prnt.sc/CZmuLb0tIX7R.
  4. 🐞 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:

Last edited 5 months ago by pmbaldha (previous) (diff)

This ticket was mentioned in Slack in #core-test by pmbaldha. View the logs.


5 months ago

#4 @nikunj8866
5 months ago

  • Keywords has-test-info added

#5 @websiteredev
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

  1. Create new test site via WP Playground
  2. Navigate to Settings > Reading
  3. Update "your homepage displays" setting from "Your latest posts" to "A static page"
  4. Update "Homepage:" setting to "Sample Page"
  5. Navigate to root URL - Sample Page is shown
  6. Navigate to "/?order=test" - latest posts are displayed
  7. Navigate to "/?orderby=test" - latest posts are displayed

Actual Results

  • ✅ Error condition occurs (reproduced).
Note: See TracTickets for help on using tickets.