-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add middleware to web to save session #1710
Conversation
It doesn't seem enough for the case where I detected it. My test case is this:
This must show the list of errors when a form is not validated here, but it's not showed. |
Does the dropdown menu not show up on the right side? |
Yes, and it is in the last request, which should have and display an addMessage capturing the form validation errors. This may be a very particular problem using Livewire, as it intercepts a thrown exception. I can't remember any other circumstances where I encountered the same problem without using Livewire, so I'll try to see if this fixes it in that case when I remember. |
In a redirect, it shows the latest request as last, so you should see the log messages on the first. is that the cases with this PR, or do you not see them at all? |
In this case there is no redirection, the debugbar was showing the last request without problems, the problem it's apparently only with added messages from any type. I have tabs with no data disabled, so there are fewer visible options because they are empty. |
Is this livewire? Or why is there no redirect? |
Yes, I say you here:
|
The Web middlewaregoup contains the SaveSession middleware, which closes the session. This makes it impossible (as far as I can tell) to save to the session, eg. for redirects.
This will add the middleware to both the regular and the normal group. It will still only boot once and inject once because of the checks, but this should make redirects work again, without any of the workarounds. (#1666 #1662 #1657 #1613 #1591 #1574 #1573) and fixes #1704