-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Regression: 2.2.0 breaks for server side rendering with code working in 2.0.0 & 2.1.1 #3307
Comments
I'm taking a look. As a temporary workaround, can you remove the trailing slash from your basename? |
This code is shipped with phenomic so it's not an easy task atm :) As a workaround I told user to stick to 2.1.1 MoOx/phenomic#393 |
Maybe this commit introduced that regression ac0b761 |
I see – this is actually exposing a different issue than the original one. I coincidentally had a fix under #3246, but I didn't cherry-pick it out. |
BTW, I'm not sure if there was some confusion, but you shouldn't be rooting your routes with a <Route path="*"> which wouldn't trigger this regression. |
Is your actual route config: <Route>
<Route path="*" />
</Route> ? |
Yeah. This
|
(In a very near futur, we are going to add more routes, but the first level is to have a common wrapper for all routes. Is there a better solution ? |
This will be fixed by #3308. I believe this is an edge case triggered by the path being We had a number of test cases for route matching in our test suite, but this specific case wasn't covered. I'm adding a regression test here with #3308 to keep this from happening again. |
Rather, this only happens when |
Ok good to hear. Thanks for your work. |
Sorry this is causing problems. We're tweaking the route matching to be stricter with slashes, to avoid a bug where a route like <Route path="foo">
<Route path="bar" />
</Route> would match a URL like Unfortunately, this requires us to be quite a lot stricter with slashes in paths, and this appears to be revealing a couple of odd edge cases. |
You are doing the right thing, no problem :) |
…3307](remix-run/react-router#3307) is fixed Also, a warning has been added.
…3307](remix-run/react-router#3307) is fixed Also, a warning has been added.
This is fixed on v2.2.2 now. |
Thanks for fixing this! |
Any more edge cases in our matching code you're hitting? 😛 |
Haha, we'll see ^^ |
It's sort of the same issue I mentioned in #3279 but with ReactRouter.match({ routes: routes, location: "/", basename: "/" }` that didn't work anymore (since 2.2.0, same with 2.2.1).
code with 2.0.0 (works with 2.1.1 too) http://jsbin.com/saziwop/edit?html,js,console
code with 2.2.0 http://jsbin.com/zivopi/edit?html,js,console
Previously my issue wwas with "/test-url" but now same issue with "/" (and basename to "/")
The text was updated successfully, but these errors were encountered: