We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin routes are matched based on URL parameters. This is not very reliable because a match is only found when the page parameter is first.
For example,
With the route:
$router->adminGet('calendars', [ 'uses' => 'CalendarController@index', 'as' => 'calendar.index', 'icon' => 'dashicons-calendar-alt', 'position' => 20, ]);
This URL will match the above route. /cms/wp-admin/admin.php?page=calendars&id=boise
/cms/wp-admin/admin.php?page=calendars&id=boise
This URL will NOT match the above route. /cms/wp-admin/admin.php?id=boise&page=calendars
/cms/wp-admin/admin.php?id=boise&page=calendars
Both should work.
Change the LaraPress UriValidator class to pull the page parameter first when checking for a WP Admin page match.
UriValidator
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem
Admin routes are matched based on URL parameters. This is not very reliable because a match is only found when the page parameter is first.
For example,
With the route:
This URL will match the above route.
/cms/wp-admin/admin.php?page=calendars&id=boise
This URL will NOT match the above route.
/cms/wp-admin/admin.php?id=boise&page=calendars
Both should work.
Suggested Fix
Change the LaraPress
UriValidator
class to pull the page parameter first when checking for a WP Admin page match.The text was updated successfully, but these errors were encountered: