-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Incorrect routing with setup.php based base #1892
Comments
assigned to @mahagr to look at. |
I just checked this and the behaviour is correct. It should do just that as the base path gets added to the urls by
|
The behaviour which I have observed is that if the name of the subsite coincides with the name (the slug) of some page, then that page (or any of its subpages) is routed incorrectly. |
Just pressed the wrong button, no intention to close the issue. |
Ok, I think I got it now. You're saying that |
Yes, exactly. Similarly, in my first example which I gave when I opened the issue, I was saying that |
Should be fixed for Grav 1.4.6 |
There is an incorrect use of
str_replace
inGrav\Common\Uri::init()
:[https://github.com/getgrav/grav/blob/eca23a918a71b0a49f5abad59e6c824f9e146351/system/src/Grav/Common/Uri.php#L321](
$uri = str_replace($setup_base, '', $uri);
).The problem is that instead of removing just the prefix, each occurence of
$setup_base
is removed. For example, if the input$uri
is equal to'/foo/bar/foo/baz'
and$setup_base
is equal to'/foo'
, then the output$uri
is now equal to'/bar/baz'
. The correct result should be'/bar/foo/baz'
.The text was updated successfully, but these errors were encountered: