Make WordPress Core

Opened 16 years ago

Last modified 43 minutes ago

#14060 reviewing defect (bug)

Misleading "You do not have sufficient permissions to access this page."

Reported by: hakre Owned by: SergeyBiryukov
Priority: normal Milestone: 7.3
Component: Plugins Version: 3.0
Severity: normal Keywords: has-patch has-screenshots has-test-info dev-feedback 2nd-opinion has-unit-tests early
Cc: Focuses:

Description

When accessing a page of a plugin in the admin that does not exists any longer, you're told by an error message, that:

You do not have sufficient permissions to access this page.

This message is a little misleading, because there is no such page.

A message that better reflects the decision to display it would be less misleading, e.g.:

The requested page is not accessible.

Attachments (19)

14060.patch​ (469 bytes ) - added by hakre 16 years ago.
Simple Patch
14060-More-Information.diff​ (479 bytes ) - added by envygeeks 16 years ago.
Better description
14060.2.patch​ (2.0 KB ) - added by SergeyBiryukov 15 years ago.
14060.3.diff​ (2.3 KB ) - added by Nikschavan 10 years ago.
Refreshed the patch
14060.4.diff​ (2.4 KB ) - added by Nikschavan 9 years ago.
Refreshed the patch with current trunk
page-does-not-exist.png​ (150.1 KB ) - added by Nikschavan 9 years ago.
New Note.jpeg​ (432.4 KB ) - added by poojapadamad 8 months ago.
before-12591.png​ (65.5 KB ) - added by ozgursar 4 weeks ago.
Before PR12591
after-12591.png​ (58.4 KB ) - added by ozgursar 4 weeks ago.
After PR12591
before.png​ (13.5 KB ) - added by huzaifaalmesbah 2 weeks ago.
after.png​ (13.0 KB ) - added by huzaifaalmesbah 2 weeks ago.
before.2.png​ (209.6 KB ) - added by arifulislam1 12 days ago.
tested before PR
after PR.png​ (218.1 KB ) - added by arifulislam1 12 days ago.
tested after PR
Misleading Message.png​ (342.7 KB ) - added by chinmoy709 12 days ago.
This message points users to a page that doesn't exist, which could be confusing.
after-pr-showing-correct-message.png​ (254.8 KB ) - added by chinmoy709 12 days ago.
After the PR the message is now showing properly.
irrelvant message.png​ (202.8 KB ) - added by syedjakir91 11 days ago.
After PR.png​ (200.4 KB ) - added by syedjakir91 11 days ago.
before.3.png​ (176.5 KB ) - added by habiburdev 8 days ago.
after.2.png​ (174.2 KB ) - added by habiburdev 8 days ago.

Change History (81)

@hakre
16 years ago

Simple Patch

#1 @hakre
16 years ago

FYI: at the end of Plugin.php there are a lot of functions undocumented and in addition to that important global variables for the admin like $parent_file or $plugin_page are not documented as well.

#2 @nacin
16 years ago

Related, #14039

@envygeeks
16 years ago

Better description

#3 @dd32
16 years ago

  • Keywords needs-patch added; has-patch removed

Both of those proposed wordings are not appropriate IMO.

The major case of that block is to prevent users accessing pages which they do not have access to, The current wording seems appropriate for that (A straight up, Permission denied message).

"The requested page is not accessible." - Doesn't convey the reason for the page being inaccessible.

An alternate solution could be such as follows to give non-existant pages a specific error:

if ( !admin_page_exists() ) {
 do_action...
 wp_die "non-existant page!"
} elseif ( !user_can_access_admin_page() ) {
 do_action...
 wp_die "You dont have access!...";
}

#4 @Ornani
16 years ago

I'm with dd32.

#5 @hakre
16 years ago

For my scenario to check whether or not a page exists, would haven been helpful already.

#6 @nacin
16 years ago

  • Milestone Awaiting Review โ†’ Future Release

#7 @hakre
16 years ago

Related: #15394

#8 @ramiy
15 years ago

Related: #18218

#9 @SergeyBiryukov
15 years ago

  • Keywords has-patch added; needs-patch removed

14060.2.patchโ€‹ implements dd32's suggestion.

#10 @SergeyBiryukov
15 years ago

Closed #18662 as a duplicate.

#11 @jane
15 years ago

"The requested page no longer exists."

#12 @SergeyBiryukov
14 years ago

  • Component Accessibility โ†’ Plugins

#15 @chriscct7
11 years ago

  • Keywords needs-refresh added

@Nikschavan
10 years ago

Refreshed the patch

#16 @Nikschavan
10 years ago

  • Keywords needs-testing added; needs-refresh removed

Refreshed the patch by @SergeyBiryukov

@Nikschavan
9 years ago

Refreshed the patch with current trunk

#18 @Nikschavan
9 years ago

  • Keywords has-screenshots added

Updated the patch with the latest trunk attached a screenshot of the error message.

Can this be targeted for 4.9?

#19 @SergeyBiryukov
9 years ago

  • Milestone Future Release โ†’ 4.9
  • Owner set to SergeyBiryukov
  • Status new โ†’ reviewing

#20 @SergeyBiryukov
9 years ago

  • Keywords early added
  • Milestone 4.9 โ†’ 5.0

#21 @SergeyBiryukov
8 years ago

  • Milestone 5.0 โ†’ 5.1

#22 @pento
8 years ago

  • Milestone 5.1 โ†’ 5.2

Patch needs testing and review.

#23 @jorbin
8 years ago

  • Milestone 5.2 โ†’ Future Release

As 5.2 is now in beta and this was something that needed early attention, I'm removing it from the milestone.

This ticket was mentioned in โ€‹PR #7613 on โ€‹WordPress/wordpress-develop by โ€‹@nirajgirixd.


2 years ago
#24

## Description

This PR addresses the issue where the misleading message You do not have sufficient permissions to access this page. was displayed when attempting to access an admin page that doesn't exist. Instead of suggesting a permissions problem, the fix ensures that users are now shown a clearer message: The requested page does not exist. This provides a more accurate and user-friendly explanation when the page is missing or unavailable.

## Screenshot

https://github.com/user-attachments/assets/583b2664-3d82-4df5-9487-5a4512099f9b

## Testing Instructions

  • Install a plugin that includes a settings page.
  • Navigate to the plugin's settings page and copy the URL.
  • Go to the plugins page and deactivate the plugin you just installed.
  • Paste the copied URL of the plugin's settings page into the browser's address bar and press Enter.
  • You should now see the message The requested page does not exist. instead of You do not have sufficient permissions to access this page.

## Trac ticket: https://core.trac.wordpress.org/ticket/14060

#25 @sainathpoojary
22 months ago

Tested the implementation and verified that the message now correctly shows "The requested page does not exist" instead of the previous permissions error.

Patch tested: โ€‹https://github.com/WordPress/wordpress-develop/pull/7613

https://utfs.io/f/PL8E4NiPUWyORiNw9VNTu5OnjW2XKY0IRv1P9lgoTaLbV4qy

Environment

  • WordPress: 6.7-beta3-59237-src
  • PHP: 8.2.26
  • Server: nginx/1.27.3
  • Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.26)
  • Browser: Chrome 131.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.0
  • MU Plugins: None activated
  • Plugins: None activated

#26 @thabotswana
22 months ago

Test Report

This report validates that the indicated patch addresses the issue.

Patch tested: โ€‹https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/7613.diff

Environment

  • OS: macOS 15.2
  • Web Server: PHP.wasm
  • PHP: 7.4.31-dev
  • WordPress: 6.8-alpha-20241025.105215
  • Browser: Firefox 133.0.3
  • Theme: Twenty Twenty-Five
  • Active Plugins: None

Actual Results

  • โœ… Issue resolved with patch.

Supplemental Artifacts

https://d.pr/i/q4JYLM

#27 @nirajgirixd
19 months ago

I submitted a PR on GitHub for this issue, which has already been approved. Other contributors have also tested and verified the changes.

I would greatly appreciate it if someone could review the ticket and either approve it, provide feedback, or guide me on the next steps.

cc: @nacin, @SergeyBiryukov, @jorbin

#28 @SergeyBiryukov
19 months ago

  • Milestone Future Release โ†’ 6.9

#29 @SirLouen
18 months ago

  • Keywords has-testing-info dev-feedback added; needs-testing removed

#30 @wordpressdotorg
17 months ago

  • Keywords has-test-info added; has-testing-info removed

โ€‹@mindctrl commented on โ€‹PR #7613:


15 months ago
#31

@nirajgiriXD I left some feedback for consideration. Also, could you bring this up to date with the latest trunk branch?

โ€‹@nirajgirixd commented on โ€‹PR #7613:


15 months ago
#32

@mindctrl Thanks for the feedback! I've implemented the suggested changes and updated the branch with the latest from trunk.

#33 @mindctrl
11 months ago

  • Keywords needs-unit-tests 2nd-opinion added; early removed

This probably needs to be moved to a future milestone. The patch isn't fully ready and needs discussion around the proposed action hook.

#34 @wildworks
11 months ago

  • Milestone 6.9 โ†’ 7.0

#35 @poojapadamad
8 months ago

Test Report

Description

This report validates whether the indicated patch works as expected.

Patch tested: โ€‹https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/7613.diff

Environment

  • WordPress: 7.0-alpha-20251202.032557
  • PHP: 7.4.33
  • Server: PHP.wasm
  • Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
  • Browser: Chrome 144.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.1

===Actual results
A message that better reflects the decision to display it would be less misleading, e.g.:
The requested page is not accessible.โœ…

Screenshot is attached for reference:

https://core.trac.wordpress.org/attachment/ticket/14060/New%20Note.jpeg

Last edited 8 months ago by poojapadamad (previous) (diff)

This ticket was mentioned in โ€‹PR #10955 on โ€‹WordPress/wordpress-develop by โ€‹@pratiknawkar94.


8 months ago
#36

  • Keywords has-unit-tests added; needs-unit-tests removed

Trac ticket:

## Use of AI Tools

This ticket was mentioned in โ€‹Slack in #core by audrasjb. โ€‹View the logs.


7 months ago

#38 @audrasjb
7 months ago

  • Keywords early added
  • Milestone 7.0 โ†’ 7.1

As per today's 7.0 pre-RC1 bug scrub:
Unfortunately, the last patch still needs testing.
It adds a new function, so 3 days before RC1 is not the best time to ship this. Moving to 7.1 with early keyword.

This ticket was mentioned in โ€‹PR #12591 on โ€‹WordPress/wordpress-develop by โ€‹@roshniahuja14.


3 months ago
#39

## Description

Accessing the URL of a plugin admin page that is no longer registered previously
showed the misleading "Sorry, you are not allowed to access this page." message,
implying a permissions problem where none exists.

This introduces admin_page_exists(), which determines whether the requested page
is registered independently of the current user's capabilities. When the page does
not exist, wp_die() is now called with a clearer "The requested page does not
exist." message and a 404 status, and a new admin_page_not_found action fires,
mirroring the existing admin_page_access_denied action.
user_can_access_admin_page() reuses the new function so the registration check is
no longer duplicated.

Builds on #7613 and #10955, adding the refactor and unit-test coverage for
admin_page_exists().

## Testing Instructions

  • Install and activate a plugin that includes a settings page.
  • Navigate to the plugin's settings page and copy the URL.
  • Deactivate the plugin.
  • Paste the copied URL into the browser's address bar and press Enter.
  • You should see "The requested page does not exist." (404) instead of "Sorry, you are not allowed to access this page."

Unit tests:
npm run test:php -- --filter admin_page_exists tests/phpunit/tests/admin/includesPlugin.php

โ€‹@wildworks commented on โ€‹PR #10955:


3 months ago
#40

Closing this in favor of #7613

โ€‹@wildworks commented on โ€‹PR #12591:


3 months ago
#41

Closing this in favor of #7613

#42 @wildworks
3 months ago

  • Milestone 7.1 โ†’ 7.2

To prevent discussion fragmentation, I have closed all PRs except for โ€‹PR 7613. Additionally, all PRs introduce a new admin_page_exists() function. However, since the addition of new APIs is generally not permitted after the Beta phase, I'd like to punt this to 7.2.

This ticket was mentioned in โ€‹Slack in #core by audrasjb. โ€‹View the logs.


4 weeks ago

#44 @audrasjb
4 weeks ago

  • Keywords needs-testing added

As per today's 7.2 bug scrub:

This one is 16 years old, owned by @SergeyBiryukov
I bugscrubed it during 7.0 and @wildworks during 7.1. We now have one PR waiting for review.
It introduces a new function, so it would be nice to review it by early October.
I'll try to have a look by next week but anyone is welcome to jump in.

(also we have good testing instructions, so I'm adding needs-testing )

@ozgursar
4 weeks ago

Before PR12591

@ozgursar
4 weeks ago

After PR12591

#45 @ozgursar
4 weeks ago

Test Report

Patch tested: โ€‹https://github.com/WordPress/wordpress-develop/pull/12591

Environment

  • WordPress: 7.2-alpha-63166-src
  • Subdirectory: No
  • PHP: 8.4.23
  • Server: nginx/1.29.4
  • Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.4.23)
  • Browser: Chrome 152.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.5
  • MU Plugins:
    • docker-loopback-fix.php
  • Plugins:
    • Test Reports 1.3.1

Steps taken

  1. Install any plugin that has a settings page (I tested with the Code Snippets plugin)
  2. Copy URL of its setting page (in my case http://localhost:8889/wp-admin/admin.php?page=snippets-settings)
  3. Deactivate the plugin and visit the copied URL
  4. Observe the error message Sorry, you are not allowed to access this page.
  5. Apply the patch
  6. Revisit the copied URL
  7. Observe the error message The requested page does not exist.
  8. โœ… Patch is solving the problem

Expected result

  • The displayed error message should not be misleading. Hence The requested page does not exist. is the correct message in this case where the URL actually does not exist.

Screenshots/Screencast with results

Before
https://core.trac.wordpress.org/raw-attachment/ticket/14060/before-12591.png

After
https://core.trac.wordpress.org/raw-attachment/ticket/14060/after-12591.png

โ€‹@muryam commented on โ€‹PR #7613:


4 weeks ago
#46

Test Report

Patch/PR tested: #7613

Environment

  • OS: Windows 11
  • Web Server: <e.g. Apache / Nginx>
  • PHP: 8.5
  • WordPress: trunk (with PR #7613 applied)
  • Browser: Chrome
  • Theme: Twenty Twenty-Five

Steps to Test

  1. Install and activate a plugin that adds an admin settings page, then copy its page URL.
  2. Deactivate the plugin.
  3. Paste the saved URL back into the browser.

Expected Results

The message should indicate the page does not exist, rather than a permissions error.

Actual Results

  • Without patch: "Sorry, you are not allowed to access this page." (misleading)
  • With patch: "The requested page does not exist." โœ…
  • Verified that legitimate permission errors are unaffected โ€” a registered page the current user genuinely lacks the capability for still returns the "not allowed" message.

Supplemental Artifacts

https://github.com/user-attachments/assets/d3e5d646-3f34-4f91-bf68-991cf77d4e71

โ€‹@westonruter commented on โ€‹PR #7613:


3 weeks ago
#47

๐Ÿค– _Comment by Claude Opus 5_

This is a review of the branch diff. The structural claims below were each verified against the current branch. Findings are ordered by severity.

The no-privilege registries are emptied after _admin_menu fires

src/wp-admin/includes/menu.php fires _admin_menu on line 41, then resets both registries on lines 84โ€“85:

$_wp_submenu_nopriv = array();
$_wp_menu_nopriv    = array();

An add_submenu_page() call made before that point โ€” on _admin_menu, or earlier still on init or plugins_loaded โ€” takes the early return at src/wp-admin/includes/plugin.php:1505, which records $_wp_submenu_nopriv[ $parent_slug ][ $menu_slug ] and deliberately touches neither $submenu nor $_registered_pages. That record is then erased before wp_admin_page_exists() ever consults it.

The consequence is that a low-privilege user requesting such a page is now told "The requested page does not exist.", when previously a permission error was shown. This is the same class of misleading message the PR sets out to fix, inverted. Registrations on admin_menu (line 168) are unaffected, since that hook fires after the reset, so the exposure is limited to the early window โ€” but that window is where a number of plugins do register.

admin_page_access_denied no longer fires for unregistered slugs

With the new elseif at src/wp-admin/includes/menu.php:375, a request for a page that does not exist reaches wp_die() on the wp_admin_page_exists() branch and never reaches do_action( 'admin_page_access_denied' ) on line 392.

That hook is used by plugins to intercept stale or mistyped ?page= requests and redirect them โ€” to a dashboard, an onboarding screen, or a renamed page. Those redirects will silently stop working for exactly the requests they were most often installed to catch. Whether or not the new behavior is preferred, it is a back-compat break that warrants a mention in the commit message and a dev note.

$admin_page_parent becomes a per-request memo on a public function

At src/wp-admin/includes/plugin.php:2237:

$parent = $admin_page_parent ?? get_admin_page_parent();

user_can_access_admin_page() is a public function that plugins call directly, and menu.php now populates $admin_page_parent early by way of wp_admin_page_exists(). Every later call therefore reuses the parent computed for the original request. A plugin that temporarily assigns $GLOBALS['plugin_page'] and then asks about access โ€” or that re-parents menus through remove_menu_page() โ€” receives an answer derived from the wrong parent, and so a wrong $hookname and a wrong boolean.

The global name is also generic enough that collision with a plugin's own global is plausible, and ?? would then silently honor the poisoned value rather than recomputing. Passing the parent as an optional argument, or keying the memo on $plugin_page/$pagenow, would avoid both problems.

The existence check ahead of the capability check creates an enumeration oracle

Because wp_admin_page_exists() is consulted first, any authenticated user who can reach admin.php can now distinguish "does not exist" from "not allowed" for an arbitrary ?page= slug. That reveals which plugins are installed and which admin page slugs they register. Previously both cases produced an identical permission error.

This is inherent to the feature rather than a defect in the implementation, and the disclosure is modest. It is raised only so that it is an explicit decision on the ticket rather than an incidental one.

Test observations

tests/phpunit/tests/admin/includesPlugin.php:111 uses global $plugin_page; unset( $plugin_page );, which unsets only the local reference โ€” $GLOBALS['plugin_page'] survives, and wp_admin_page_exists() re-imports it through its own global statement. The assertion passes only because reset_menu_globals() already unset the global correctly during set-up, so the test does not exercise the condition it is named for. unset( $GLOBALS['plugin_page'] ); would.

test_wp_admin_page_exists_returns_true_for_a_registered_page() builds $_registered_pages on line 125 from the same get_plugin_page_hookname( $plugin_page, $admin_page_parent ) call that the function under test performs, so it asserts that an expression equals itself and would still pass if hookname derivation were wrong. Registering through the public API as an administrator โ€” as the fourth test already does โ€” would give it teeth.

Noted and discounted

The scan at src/wp-admin/includes/plugin.php:2175 iterates every parent in $_wp_submenu_nopriv rather than scoping to the resolved parent, so tools.php?page=foo reports as existing when foo is a no-privilege submenu of options-general.php. That errs toward a permission error instead of a 404, which is the safer direction here, and appears deliberate.

#48 @vgnavada
3 weeks ago

Test Report

Patch tested: โ€‹https://github.com/WordPress/wordpress-develop/pull/7613

Environment

  • WordPress: 7.2-alpha-20260921.194908
  • Subdirectory: No
  • PHP: 8.3.33
  • Server: PHP.wasm
  • Database: WP_MySQL_On_SQLite (Server: 8.0.38-mysql-on-sqlite-3.0.2 / Client: 3.51.0)
  • Browser: Chrome 153.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.5
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.3.1

Steps taken

  1. Tested the current WordPress Core behaviour without the patch.
  2. Accessed an admin page URL that was no longer registered/available.
  3. Confirmed that WordPress displayed: "Sorry, you are not allowed to access this page."
  4. Repeated the same test using WordPress Playground with PR #7613 applied.
  5. Accessed the same type of unavailable admin page URL.
  6. Confirmed that WordPress displayed: "The requested page does not exist."
  7. โœ… Patch is solving the problem.

Expected result

  • When an admin page does not exist, WordPress should display an accurate message indicating that the requested page does not exist, instead of incorrectly suggesting that the user lacks permission to access it.

Additional Notes

  • The issue was successfully reproduced before applying the patch.
  • After applying PR #7613, the misleading permissions message was replaced with the expected "The requested page does not exist." message.
  • No unexpected behaviour was observed during this test.

Screenshots/Screencast with results

Support Content

@huzaifaalmesbah
2 weeks ago

#49 @huzaifaalmesbah
2 weeks ago

Test Report

Patch tested: โ€‹https://github.com/WordPress/wordpress-develop/pull/7613

Environment

  • WordPress: 7.2-alpha-63166-src
  • Subdirectory: No
  • PHP: 8.3.35
  • Server: nginx/1.31.6
  • Database: mysqli (Server: 9.7.2 / Client: mysqlnd 8.3.33)
  • Browser: Chrome 154.0.8037.58
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.5
  • MU Plugins: None activated
  • Plugins: None activated

Steps taken

  1. Log in to the WordPress admin panel (/wp-admin/).
  2. Navigate to an admin page URL that is not registered or whose plugin is inactive (e.g. /wp-admin/admin.php?page=non-existent-plugin-page).
  3. Observe the error message and HTTP status code returned on the page.
  4. โœ… Patch is solving the problem

Expected result

  • WordPress displays 'The requested page does not exist.' with HTTP 404 status when an admin page is missing.

Screenshots/Screencast with results

@arifulislam1
12 days ago

tested before PR

@arifulislam1
12 days ago

tested after PR

#50 @arifulislam1
12 days ago

Test Report

Patch tested: โ€‹https://github.com/WordPress/wordpress-develop/pull/7613

Environment

  • WordPress: 7.2-alpha-20261002.112716
  • Subdirectory: No
  • PHP: 8.3.33
  • Server: PHP.wasm
  • Database: WP_MySQL_On_SQLite (Server: 8.0.38-mysql-on-sqlite-3.0.2 / Client: 3.51.0)
  • Browser: Chrome 154.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.5
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.3.1

Steps taken

  1. Log in to the WordPress admin panel (/wp-admin/).
  2. Navigate to an admin page URL that is not registered or whose plugin is inactive (e.g. /wp-admin/admin.php?page=snippets-settings). While testing, the Code Snippets plugin was deactivated so that the page is not currently available.
  3. Observe the error message and HTTP status code returned on the page.
  4. โœ… Patch is solving the problem

Expected result

WordPress displays 'The requested page does not exist.' with HTTP 404 status when an admin page is missing.

Screenshots/Screencast with results

@chinmoy709
12 days ago

This message points users to a page that doesn't exist, which could be confusing.

@chinmoy709
12 days ago

After the PR the message is now showing properly.

#51 @chinmoy709
12 days ago

Test Report

Patch tested: REPLACE_WITH_PATCH_URL

Environment

  • WordPress: 7.2-alpha-20261002.115318
  • Subdirectory: No
  • PHP: 8.3.33
  • Server: PHP.wasm
  • Database: WP_MySQL_On_SQLite (Server: 8.0.38-mysql-on-sqlite-3.0.2 / Client: 3.51.0)
  • Browser: Chrome 142.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.5
  • MU Plugins: None activated
  • Plugins:
    • Fluent Forms 6.2.15
    • Hello Dolly 1.7.2
    • Test Reports 1.3.1

Steps taken

  • Added Fluent Forms plugin
  • Visited ?page=fluent_forms_2 which is not an exisiting plugin page
  • The Error occurs "This message is a little misleading, because there is no such page."
  • After installing the patch the issue is solved

Expected result

  • A message that better reflects the decision to display it would be less misleading, e.g.:

"The requested page is not accessible."

Screenshots/Screencast with results

#52 @ahsannayem
12 days ago

Test Report

Environment

  • WordPress: 7.2-alpha-20261002.120743
  • Subdirectory: No
  • PHP: 8.3.33
  • Server: PHP.wasm
  • Database: WP_MySQL_On_SQLite (Server: 8.0.38-mysql-on-sqlite-3.0.2 / Client: 3.51.0)
  • Browser: Chrome 154.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.5
  • MU Plugins: None activated
  • Plugins:
    • Hello Dolly 1.7.2
    • Test Reports 1.3.1

Steps taken

Added FluentCRM plugin
Visited ?page=fluent_crm_2 which is not an exisiting plugin page
The Error occurs "This message is a little misleading, because there is no such page."
After installing the patch the issue is solved

Expected result

It should show page does not exist.

Screenshots/Screencast with results

Before:

โ€‹https://prnt.sc/UkO7_8t-Klgk

After:

โ€‹https://prnt.sc/82VUiALtcMRv

#53 @marzanhusain
12 days ago

Test Report

Patch tested: โ€‹https://github.com/WordPress/wordpress-develop/pull/7613

Environment

WordPress: 7.2โ€‘alphaโ€‘20261002.120743

Subdirectory: No

PHP: 8.3.33

Server: PHP.wasm

Database: WP_MySQL_On_SQLite (Server: 8.0.38โ€‘mysqlโ€‘onโ€‘sqliteโ€‘3.0.2 / Client: 3.51.0)

Browser: Chrome 154.0.0.0

OS: macOS

Theme: Twenty Twentyโ€‘Five 1.5

MU Plugins: None activated

Plugins:

Hello Dolly 1.7.2

Test Reports 1.3.1

Steps taken

Added FluentCRM plugin.

Navigated to ?page=fluent_crm_2, which is not an existing plugin page.

Observed the error message returned.

Applied the patch from PR #7613.

Repeated the same navigation to confirm behavior.

Expected result

A clearer message that reflects the missing page, e.g.:

โ€œThe requested page is not accessible.โ€

HTTP status code should be 404.

Actual result

Before patch:

โ€œYou do not have sufficient permissions to access this page.โ€

HTTP status code returned: 200 (misleading).

After patch:

โ€œThe requested page does not exist.โ€

HTTP status code returned: 404 (correct).

โœ… Patch is solving the problem

Screenshots/Screencast with results

Before:
https://res.cloudinary.com/dtz0urit6/image/upload/q_auto:best

After:
https://ibb.co.com/pBPT2Mty

@syedjakir91
11 days ago

#54 @syedjakir91
11 days ago

Test Report

Patch tested:https://github.com/WordPress/wordpress-develop/pull/7613

Environment

  • WordPress: 7.2-alpha-20261002.145137
  • Subdirectory: No
  • PHP: 8.3.33
  • Server: PHP.wasm
  • Database: WP_MySQL_On_SQLite (Server: 8.0.38-mysql-on-sqlite-3.0.2 / Client: 3.51.0)
  • Browser: Chrome 153.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.5
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.3.1

Steps taken

  1. Log in to the WordPress admin panel (/wp-admin/).
  2. Navigate to an admin page URL that is not registered or whose plugin is inactive (e.g. /wp-admin/fluent-crm_3/). While testing, this plugin was deactivated so that the page is not currently available.
  3. Observe the error message and HTTP status code returned on the page.
  4. โœ… Patch is solving the problem

Expected result

  • WordPress displays 'The requested page does not exist.' with HTTP 404 status when an admin page is missing.

Screenshots/Screencast with results

@habiburdev
8 days ago

@habiburdev
8 days ago

#55 @habiburdev
7 days ago

Bug Report

Description

When attempting to access a non-existent settings admin page (e.g., wp-admin/options-general.php?page=non-existing-settings-page-slug), WordPress does not handle the invalid slug cleanly, leading to an unexpected screen layout or improper redirection instead of a clean error/redirect handling.

Environment

  • WordPress: 7.2-alpha-20261005.233140
  • Subdirectory: No
  • PHP: 8.3.33
  • Server: PHP.wasm
  • Database: WP_MySQL_On_SQLite (Server: 8.0.38-mysql-on-sqlite-3.0.2 / Client: 3.51.0)
  • Browser: Chrome 153.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.5
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.3.1

Steps to Reproduce

  1. Log in to the WordPress admin dashboard.
  2. Navigate to a non-existent settings page URL under Settings: http://example.com/wp-admin/options-general.php?page=non-existing-settings-page-slug
  3. Observe the rendered page behavior.
  4. ๐Ÿž Bug occurs.

Expected Results

  1. โœ… WordPress should gracefully handle the invalid page query parameter (e.g., displaying a standard "Cannot load [page]" error or redirecting safely back to the main Settings screen).

Actual Results

  1. โŒ The invalid page request fails to handle the non-existent slug properly, resulting in unexpected layout rendering or missing navigation state.

Additional Notes

  • Re-tested against current trunk (7.2-alpha) in a browser-based PHP.wasm test environment.

Supplemental Artifacts

โ€‹@westonruter commented on โ€‹PR #7613:


7 days ago
#56

@nirajgiriXD You can skip merging from trunk unless there are merge conflicts. Otherwise, this most likely this just waste CPU time running the jobs and it creates noise.

#57 @audrasjb
7 days ago

Hello, this ticket is marked early so it would be nice to have it committed this week as we are only two weeks from 7.2 beta 1. If it doesn't look realistic, we should move it to Future Release.

#58 @peterwilsoncc
43 hours ago

  • Keywords needs-testing removed

This ticket was mentioned in โ€‹Slack in #core by audrasjb. โ€‹View the logs.


69 minutes ago

#60 @audrasjb
68 minutes ago

  • Milestone 7.2 โ†’ Future Release

As per today's 7.2 bug scrub:
No change in the previous week, so I'm inclined to move it to Future Release.

#61 @audrasjb
44 minutes ago

  • Milestone Future Release โ†’ 7.3

Moving to 7.3 which was just created.

#62 @audrasjb
43 minutes ago

Moving to 7.3 which was just created.

Note: See TracTickets for help on using tickets.