[wp-trac] [WordPress Trac] #56302: Admin menu links have relative URLs

WordPress Trac noreply at wordpress.org
Sun Jul 31 01:21:30 UTC 2022


#56302: Admin menu links have relative URLs
-------------------------------------------------+-------------------------
 Reporter:  iihglobal                            |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Administration                       |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-screenshots dev-feedback has-    |     Focuses:
  patch has-testing-info needs-testing           |  administration
-------------------------------------------------+-------------------------
Changes (by costdev):

 * keywords:  has-screenshots => has-screenshots dev-feedback has-patch has-
     testing-info needs-testing


Comment:

 [https://core.trac.wordpress.org/attachment/ticket/56302/56302.diff
 56302.diff] is one way to resolve this issue by converting relative URLs
 to absolute URLs, relative to `admin_url()`.

 == Testing Instructions

 === Steps to Reproduce
 1. Navigate to `/wp-admin/options.php/` - Note the trailing slash.
 2. Click `General`.
 3. 🐞 The contents do not change, but the URL changes to `/wp-
 admin/options.php/options-general.php`.
 4. Apply
 [https://core.trac.wordpress.org/attachment/ticket/56302/56302.diff
 56302.diff].
 5. Navigate to `/wp-admin/options.php/` - Note the trailing slash.
 6. Click `General`.

 === Expected Results
 - 🐞 Before the patch: The `options.php` page's contents remain, but the
 URL changes to `/wp-admin/options.php/options-general.php`.
 - ✅ After the patch: The contents change to the `General` page's
 contents, and the URL is `/wp-admin/options-general.php`.

 === Notes
 - This patch is an example of one approach, but be aware that there are
 further changes required to the `WP_List_Tables` views links, as well as
 all other relative links throughout the Dashboard. I'm happy to continue
 this work to address the other areas, if the approach in the patch is
 desired.
 - Adding `dev-feedback` to see if this approach is desired or if there are
 other ideas of how to manage this throughout the Dashboard.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56302#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list