Skip to content
New issue

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

Wrong URI parsing in MenuItemMatcher when trying to find a partial match #6588

Closed
JorickPepin opened this issue Nov 27, 2024 · 2 comments
Closed
Labels
Milestone

Comments

@JorickPepin
Copy link
Contributor

Since the removal of the trailing slash in index routes (cf. #6539), the MenuItemMatcher do not parse the current request URI well when trying to find a partial match because of the regex used:

$currentRequestUriWithoutAction = preg_replace('#/[^/]+$#', '', $currentRequestUriWithoutQueryString);

Before:

  • /admin/post/
  • /admin/post/new

Now:

  • /admin/post
  • /admin/post/new

The current request URI is then associated with the dashboard one when this is not the case:

image

@javiereguiluz
Copy link
Collaborator

Closing as fixed in #6625.

@JorickPepin
Copy link
Contributor Author

Hello @javiereguiluz, I've just tested the latest release and the problem is still there. I added a test in #6592 that covers the case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants