Make WordPress Core

Opened 2 years ago

Last modified 23 months ago

#58161 new defect (bug)

WordPress post editor pagination uses inconsistent URL variable to rest of site

Reported by: roballshouse's profile roballshouse Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.2
Component: Administration Keywords: needs-testing-info
Focuses: Cc:

Description (last modified by sabernhardt)

/wp-admin/edit.php

uses functions in class-wp-list-table.php

Which uses
$current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );

While all other pages use
WP_SITE_URL

Thus, when in the post editor, the "Next page" goes to (in my case) https://127.0.0.1:8090/wp-admin/edit.php?paged=2, instead of to <my_url>/wp-admin/edit.php?paged=2 like the rest of wp_admin

Change History (6)

#1 @sabernhardt
2 years ago

  • Description modified (diff)

#2 @sabernhardt
2 years ago

  • Component changed from Editor to Administration

Related: #16858, #36201

#3 @sabernhardt
2 years ago

also related: #53998

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


23 months ago

#5 @ironprogrammer
23 months ago

  • Keywords needs-testing-info added

Welcome to Trac, @roballshouse, and thank you for the report!

This ticket could use some testing steps that would make reproduction of the issue more straightforward, so I've added the appropriate keyword. Please feel free to add these steps, or the keyword may also signal other contributors to do the same.

Last edited 23 months ago by ironprogrammer (previous) (diff)

#6 @roballshouse
23 months ago

Testing Instructions

Setup a WP environment with separate SERVERHTTP_HOST? values (such as 127.0.0.1) and WP_SITE_URL value (such as a custom domain, pointing to the host)

Navigate to Post editor, and look at "Next Page" URL

Steps to Test

  1. Navigate to <server>/wp-admin/edit.php on remote system using domain (e.g. ww.myblog.com/wp-admin/edit.php)
  2. Attempt to click <Next Page>
  3. Fail due to invalid URL (such as https://127.0.0.1:8090/wp-admin/edit.php?paged=2)

Expected Results

Lists each expected result or behavior, i.e. what should happen when running the test(s):

  • ✅ Able to navigate between post edit pages
Note: See TracTickets for help on using tickets.