- Issue created by @monaw
- 🇫🇷France andypost
Thank you, it's duplicate of 🐛 Call to undefined method MetadataBag::getMasquerade() at MasqueradeCacheContext.php line 31 Needs review
I was running Masquerade 2.0.0-rc4 and it worked fine. Then I upgraded to 2.0.0 and immediately got WSOD. So then I tried to downgrade to 2.0.0-rc5 and also got WSOD. Finally I went back to 2.0.0-rc4 and my site is back.
Once I am able to use my site again, I checked the logs and I see the following PHP error:
Error: Call to undefined method Drupal\Core\Session\MetadataBag::getMasquerade() in Drupal\masquerade\Masquerade->getMasquerade() (line 139 of /var/www/drupal/web/modules/contrib/masquerade/src/Masquerade.php).
with these backtrace:
#0 /var/www/drupal/web/modules/contrib/masquerade/src/Masquerade.php(149): Drupal\masquerade\Masquerade->getMasquerade()
#1 /var/www/drupal/web/modules/contrib/masquerade/src/Plugin/Block/MasqueradeBlock.php(92): Drupal\masquerade\Masquerade->isMasquerading()
#2 /var/www/drupal/web/core/lib/Drupal/Core/Block/BlockPluginTrait.php(127): Drupal\masquerade\Plugin\Block\MasqueradeBlock->blockAccess()
#3 /var/www/drupal/web/core/modules/block/src/BlockAccessControlHandler.php(124): Drupal\Core\Block\BlockBase->access()
#4 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php(109): Drupal\block\BlockAccessControlHandler->checkAccess()
#5 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityBase.php(329): Drupal\Core\Entity\EntityAccessControlHandler->access()
#6 /var/www/drupal/web/core/modules/block/src/BlockRepository.php(63): Drupal\Core\Entity\EntityBase->access()
#7 /var/www/drupal/web/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php(137): Drupal\block\BlockRepository->getVisibleBlocksPerRegion()
#8 /var/www/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(270): Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build()
#9 /var/www/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#10 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#11 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#12 /var/www/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#13 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#14 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#15 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#16 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#17 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#18 /var/www/drupal/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#19 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#20 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#21 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#22 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#23 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#24 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#25 /var/www/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#26 /var/www/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#27 {main}
FYI, I'm running D10.2.10
Active
2.0
Code
Thank you, it's duplicate of 🐛 Call to undefined method MetadataBag::getMasquerade() at MasqueradeCacheContext.php line 31 Needs review