-
Notifications
You must be signed in to change notification settings - Fork 98
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
FR: save notifications over multiple redirects #71
Comments
Core Laravel flash messages can be kept alive for another page using this method:
So something like |
So if I understand how this package works, the notifications are put into the So if a controller redirect needs to take the previous page notifications with it on a redirect, it needs to move the notifications in the |
On a kind of very similar vein, I am finding the notification messages are getting lost on a browser redirect. In an iframe, I am handling 3D Secure. On success in the iframe, I am setting a Notification message, then returning a single self-submitting GET form with a target of Are the Notifications perhaps only written to the session on a redirect? Edit: on a hunch, I switched off the debug bar, and the notifications started working again. Unlike doing a server redirect, displaying an auto-submit form also displayed the debug bar along with the form. The debug bar does an AJAX call which then consumes the notifications on that page, so when the form takes the browser to the next page, there are no notifications left to display. I'll raise this with the debug bar, to see if there is some way to disable it for specific pages always. That solves the additional related issue at least. |
A notification will normally be available on the next page, and will subsequently be removed from the session after that.
An instant notification will appear on the current page and will not even make it into the session.
What does not seem to be covered, is saving the notifications for displaying several pages from now. For example, I set a notification, then redirect to the next page. That next page does a check which means it also needs to immediately redirect to another page. The notifications are lost in that second redirect. There needs to be a way to tell this package to hold on to the messages just one more page. Maybe there is a way, and I am just missing it?
The text was updated successfully, but these errors were encountered: