Skip to content
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

Make sure session is saved after changing #1573

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Conversation

barryvdh
Copy link
Owner

Looks like the session isn't properly saved. Not sure if this is Laravel 11 specific or not.
Happens when redirecting.

@barryvdh barryvdh merged commit ce971ee into master Mar 12, 2024
25 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix-session-save branch March 12, 2024 12:08
@theupriser
Copy link

Hi @barryvdh, After updating to the new version and I came from version 3.11 -> 3.12.1. The session flash data isn't available anymore after post -> redirect back to view with flash data.

@barryvdh
Copy link
Owner Author

Which Laravel version?

@theupriser
Copy link

theupriser commented Mar 13, 2024

Both 10 and 11's latest releases.

I've narrowed it down to the debugbar. After downgrading to 3.11 my form validation etc. worked again.

barryvdh added a commit that referenced this pull request Mar 13, 2024
barryvdh added a commit that referenced this pull request Mar 13, 2024
@barryvdh
Copy link
Owner Author

Hmm I'l revert for now, not sure why.
Which session driver?

@theupriser
Copy link

theupriser commented Mar 13, 2024

Just the default one:

SESSION_DRIVER=file

After reverting it works again. Thanks!

@barryvdh
Copy link
Owner Author

Tagged a new release

@barryvdh
Copy link
Owner Author

Curious, do redirects still show in the dropdown in de debugbar? Eg after a POST which redirects, does it show the POST and the GET in the dropdown?

@theupriser
Copy link

Thank you!

@theupriser
Copy link

theupriser commented Mar 13, 2024

Curious, do redirects still show in the dropdown in de debugbar? Eg after a POST which redirects, does it show the POST and the GET in the dropdown?

They do yes, but just without the flash data

Give me 2 seconds, I'll get some screenshots

@theupriser
Copy link

Post request from form:
image

Redirect to view after error
image

@theupriser
Copy link

@barryvdh I found out why it was not working at my side.

In a package I made for our CMS I tried to make sure the ShareErrorsFromSession middleware was in the middleware stack. For some reason this was not a problem in laravel 10 but it is in laravel 11.

I tested again with the previous version to make sure it wasn't at the debugbar side. It isn't. Your change was not my problem. But thanks for acting fast! 👍

@barryvdh
Copy link
Owner Author

Re-did the same PR with #1591

barryvdh added a commit that referenced this pull request Apr 1, 2024
barryvdh added a commit that referenced this pull request Apr 10, 2024
barryvdh added a commit that referenced this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants