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

1.7: Query params dropped when ? is preceded with / #2964

Closed
pamtbaau opened this issue Jul 13, 2020 · 2 comments
Closed

1.7: Query params dropped when ? is preceded with / #2964

pamtbaau opened this issue Jul 13, 2020 · 2 comments
Assignees

Comments

@pamtbaau
Copy link
Contributor

In Grav v1.7.0-rc.14, Query params which are preceded with a '/' will be dropped when Grav redirects to url without '/'.

E.g.:
mydomain/typography/?a=b is redirected to mydomain/typography

Problem seems to be caused by Uri::toArray() which doesn't return query_params => $this->queries as part of the Uri parts.

Adding query_params => $this->queries to the returned array fixes the issue.

@rhukster rhukster added the bug label Jul 15, 2020
@Flamenco
Copy link

Flamenco commented Dec 2, 2020

I verify this is a still a bug, introduced in said version, and has still not been fixed. Our plugin generates URLs such as:

http://localhost:8080/admin/powertools/edit-section/?section=hello

and we needed to rework all the code to:

http://localhost:8080/admin/powertools/edit-section?section=hello

@pamtbaau
Copy link
Contributor Author

Thanks @mahagr

@mahagr mahagr closed this as completed Dec 14, 2020
mahagr added a commit that referenced this issue Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants