[wp-trac] [WordPress Trac] #64721: menu-header.php uses relative file_exists() causing wrong submenu URL when PHP CWD is not wp-admin/
WordPress Trac
noreply at wordpress.org
Thu Feb 26 07:09:07 UTC 2026
#64721: menu-header.php uses relative file_exists() causing wrong submenu URL when
PHP CWD is not wp-admin/
-----------------------------------+------------------------------
Reporter: paoltaia | Owner: (none)
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 6.9.1
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+------------------------------
Changes (by ozgursar):
* keywords: has-patch needs-testing 2nd-opinion => has-patch 2nd-opinion
Comment:
== Patch Testing Report
Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11054
=== Environment
- WordPress: 7.0-beta1-20260225.232239
- PHP: 8.3.30
- Server: PHP.wasm
- Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
- Browser: Chrome 145.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins:
* GeoDirectory Fast AJAX 1.0.0
- Plugins:
* GeoDirectory 2.8.152
* Test Reports 1.2.1
=== Steps taken
1. Install GeoDirectory to latest trunk via WordPress Playground
https://playground.wordpress.net/?php=8.3&wp=trunk&plugin=geodirectory
2. Check the `Places > Settings` submenu page URL
3. Confirm it links to `/wp-admin/admin.php?page=gd_place-settings`
4. Apply patch via Playground link below:
https://playground.wordpress.net/?php=8.3&wp=trunk&core-
pr=11054&plugin=geodirectory
5. Check the `Places > Settings` submenu page URL
6. Confirm it links to `/wp-admin/edit.php?post_type=gd_place&page
=gd_place-settings`
x. ✅ Patch is solving the problem
=== Expected result
- URL is correctly pointing at `/edit.php?post_type=XYZ`
=== Screenshots/Screencast with results
Before patch
[[Image(https://i.imgur.com/MtDaZOf.png)]]
After patch
[[Image(https://i.imgur.com/Q4eFQVI.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64721#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list