WSOD with error after upgrade

Created on 14 June 2024, 5 months ago
Updated 30 July 2024, 4 months ago

Problem/Motivation

I just upgrade this module from 4.0.0 to 4.0.1 and got a WSOD with this error:

Error: Call to undefined method Symfony\Component\HttpFoundation\RequestStack::isMasquerading() in Drupal\password_policy\EventSubscriber\PasswordPolicyEventSubscriber->checkForUserPasswordExpiration() (line 118 of modules/contrib/password_policy/src/EventSubscriber/PasswordPolicyEventSubscriber.php).

call_user_func(Array, Object, 'kernel.request', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.request') (Line: 157)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I'm using D10.2.7...

๐Ÿ› Bug report
Status

Closed: works as designed

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @monaw
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia jaime@gingerrobot.com

    jaime@gingerrobot.com โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia jaime@gingerrobot.com

    Hi @monaW I have just come across this issue too. I see the password policy module can not find this function which is in the masquerade module. I've added commit to a branch to use masquerade module instead. I'm not sure if masquerading data comes from anywhere else sometimes.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance jibus

    Same issue here.

  • Status changed to Closed: works as designed 4 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishalkhode

    I'm able to reproduce the issue, but clearing cache fixed the issue. The error came because arguments in password_policy_event_subscriber enty_subscriber service was updated. In release 4.0.0, the 3rd argument was service @request_stack which is now updated to @?masquerade. The service objects are cached by Drupal, so whenever there's change in service definition, the cache clearing is required. Hence, closing this ticket. Feel free to re-open the ticket, if you think it's otherwise or have any other questions/concerns.
    Thanks.

Production build 0.71.5 2024