Problem/Motivation
After trying to login for the first time or using one time login link.
I'm getting:
TypeError: Symfony\Component\HttpFoundation\Session\Flash\FlashBag::peek(): Argument #1 ($type) must be of type string, array given, called in /var/www/html/web/core/lib/Drupal/Core/Messenger/Messenger.php on line 59 in Symfony\Component\HttpFoundation\Session\Flash\FlashBag->peek() (line 62 of /var/www/html/vendor/symfony/http-foundation/Session/Flash/FlashBag.php).
callstack:
#0 /var/www/html/web/core/lib/Drupal/Core/Messenger/Messenger.php(59): Symfony\Component\HttpFoundation\Session\Flash\FlashBag->peek(Array)
#1 /var/www/html/web/modules/contrib/first_time_login/first_time_login.module(115): Drupal\Core\Messenger\Messenger->addMessage('In order to opt...', Array)
#2 [internal function]: first_time_login_user_login(Object(Drupal\user\Entity\User))
#3 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(409): call_user_func_array(Object(Closure), Array)
#4 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(388):
Steps to reproduce
Install fresh d10
install first time login
install one generated admin link
Generate a new user link and test it
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | after.png | 38.59 KB | rajdip_755 |
| #5 | before.png | 187.81 KB | rajdip_755 |
| #2 | 3415376-first-time-login.patch | 1.22 KB | foxrip |
Issue fork first_time_login-3415376
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
foxrip commentedComment #3
foxrip commentedComment #4
rajdip_755Hi @foxrip
Changing the state of the issue to the "needs review" as you have already added a patch.
Comment #5
rajdip_755I have applied this patch. It's working fine for me.
Comment #6
rajdip_755Comment #7
neerajsinghComment #9
neerajsingh