You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was squashed before being merged into the 2.x branch.
Discussion
----------
[LiveComponent] Fix LiveUrlSubscriber throw `MethodNotAllowed`
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Docs? | no <!-- required for new features -->
| Issues | Fix#2960
| License | MIT
> [!WARNING]
> Not sure this is enough, but If anyone wants to build on it, feel free - wont be around tomorrow.
---
The new LiveUrlSubscriber calls the Router to match the previous Url.
At that instant, the RoutingContext is most of the time in POST, and so calling router->match($previousUrl) would throw a MethodNotAllowedException
---
Most recent commit ([Catch MethodNotAllowedException](1da8a7b)) fixes _**this**_ issue ... but I think we have probably other use cases where it would not work.
My previous commit (reverted in the current state) [Force RequestsContext to "GET"](e81aad2) seems a more promising lead.
And the first one (reverted too in current state) [No LiveProps no change](1da8a7b) was to avoid entirely the generation when no props were extracted from URL... sadly i don't think it's enough to say "no props should now be used in URL".. ?
---
Thank you `@zacharylund` for the investigation and `@jmsche` for the perfect reproducer
Commits
-------
5b8d701 [LiveComponent] Fix LiveUrlSubscriber throw `MethodNotAllowed`
0 commit comments