- Issue created by @bpietsch
Could we see enough of your code implementation to see if this is a bug or an API misunderstanding?
OK, One additional critical bit to reproduction is that you need to access session data in the middleware code in order to see the issue. That patch I've attached in comment #5 (3537044-3.patch) is a simple module that reproduces the issue. Install the module on the admin page (appears under development section), log-into the site and then visit any URL that redirects (such as "/user?check_logged_in=1"). This will reproduce in 11.2, but not 11.1.8 and also will not reproduce in 11.2 if session data is not accessed.
Please let me know if you need further details.
In my case, the use of session is to access cached data that is expensive to retrieve. My use case is to display a warning to the logged in user based on this cached data on every page until that address the issue.
- 🇳🇿New Zealand quietone
If this problem was discovered on a version of Drupal that is not 11.x, add that information in the issue summary and leave the version at 11.x. In Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies → . Also mentioned on the version → section of the list of issue fields documentation. Thanks.