Problem/Motivation
Cannot log in using Drupal account, but can with miniOrange SSO
Steps to reproduce
- Log out
- Log back in using Drupal account
Expect to be logged in - a session started.
Instead:
You see the logged in page, but also the login link at the top right hand side and no menu items.
This error appears in the error log:
RuntimeException: Failed to start the session because headers have already been sent by "<drupal root>/vendor/symfony/http-foundation/Response.php" at line 1224. in Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage->start() (line 152 of <drupal root>/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php)
#0 <drupal root>/web/core/lib/Drupal/Core/Session/SessionManager.php(162): Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage->start()
#1 <drupal root>/web/core/lib/Drupal/Core/Session/SessionManager.php(193): Drupal/Core/Session/SessionManager->startNow()
#2 <drupal root>/vendor/symfony/http-foundation/Session/Session.php(189): Drupal/Core/Session/SessionManager->save()
#3 <drupal root>/web/core/lib/Drupal/Core/StackMiddleware/Session.php(60): Symfony/Component/HttpFoundation/Session/Session->save()
#4 <drupal root>/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal/Core/StackMiddleware/Session->handle()
#5 <drupal root>/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal/Core/StackMiddleware/KernelPreHandle->handle()
#6 <drupal root>/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal/page_cache/StackMiddleware/PageCache->pass()
#7 <drupal root>/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal/page_cache/StackMiddleware/PageCache->handle()
#8 <drupal root>/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal/Core/StackMiddleware/ReverseProxyMiddleware->handle()
#9 <drupal root>/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal/Core/StackMiddleware/NegotiationMiddleware->handle()
#10 <drupal root>/web/core/lib/Drupal/Core/DrupalKernel.php(716): Stack/StackedHttpKernel->handle()
#11 <drupal root>/web/index.php(19): Drupal/Core/DrupalKernel->handle()
#12 {main}
Environment
- OS - Windows 10 and Windows Database Server
- Web server - IIS
- PHP v7.4
- Database - MySQL 8.0
- Drupal 9.2.0
- Browser - Edge, Chrome ot Firefox
Proposed resolution
Commenting out line 1224 of <drupal root>/vendor/symfony/http-foundation/Response.php appears to cure the issue, but I am worried about side effects. My knowledge of Drupal is insufficient to be able to determine this - it was a quick fix, but someone with more knowledge than I can probably determine where the patch should really take place.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #2
longwaveAre you using redirect_after_login module? Please see #3214949: Headers have already been sent after upgrade to Drupal 9.2 (can't login)
Comment #3
larowlanComment #6
kristen polThanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.
As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" more than a year ago, and there has been no activity since then.
Since we need more information to move forward with this issue, I am keeping the status at Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #8
tintoI have tried to reproduce this behaviour on a production site that uses MiniOrange SSO, but I could not recreate the errors described in the issue summary. I realize this may not be the ideal environment to attempt to recreate this issue, but it couldn't hurt to try. :)
By the way, is this really a core issue if it requires installing a contrib module?
Considering the result of my attempt and taking into account the fact that this issue has gone stale quite some time ago, with no further updates despite previous requests for further info, I'm closing this issue.
If anyone does manage to recreate this problem, please feel free to reopen this issue and provide clear steps to reproduce (starting with "Install a fresh install of Drupal version..."). Thank you!