-
-
Notifications
You must be signed in to change notification settings - Fork 377
[LiveComponent] Fix LiveUrlSubscriber throw MethodNotAllowed
#2961
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reactivity 🙏🏻
Btw it fixed https://symfony-devs.slack.com/archives/C3EQ7S3MJ/p1753802642567209 issue |
Thx for this MR. Waiting about this live. I found a workaround adding method in my attributes |
Thanks 🙌 This bug has caused quite a few issues in Sylius. Do you have plans to release a patch soon? |
Hello there, I can confirm the patch fixes the reported issue :) |
We can release this MR today I think. I wish we could have fixed #2963 before, but I think we will tag a 2nd release later |
MethodNotAllowed
Thanks for your quick response and PR 💪🏻 We have tested this workaround in Sylius and can confirm that it solves the problem. We would greatly appreciate a patch as soon as possible 🙏🏻 |
Same problem here |
1da8a7b
to
5b8d701
Compare
Thank you Simon. |
2.28.2 released |
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) 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" seems a more promising lead.
And the first one (reverted too in current state) No LiveProps no change 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