- Issue created by @duckydan
- 🇺🇸United States duckydan
Here is the specific error in my case:
a:6:{s:5:"%type";s:72:"Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException";s:8:"@message";s:86:"You have requested a non-existent service "entity_route_context.entity_route_context".";s:9:"%function";s:53:"Drupal\Component\DependencyInjection\Container->get()";s:5:"%file";s:93:"/var/www/html/beta.weavercafe/web/core/lib/Drupal/Component/DependencyInjection/Container.php";s:5:"%line";i:157;s:17:"@backtrace_string";s:4242:"#0 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/Plugin/Context/LazyContextRepository.php(71): Drupal\Component\DependencyInjection\Container->get() #1 /var/www/html/beta.weavercafe/web/core/modules/block/src/BlockAccessControlHandler.php(91): Drupal\Core\Plugin\Context\LazyContextRepository->getRuntimeContexts() #2 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php(109): Drupal\block\BlockAccessControlHandler->checkAccess() #3 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/Entity/EntityBase.php(329): Drupal\Core\Entity\EntityAccessControlHandler->access() #4 /var/www/html/beta.weavercafe/web/core/modules/block/src/BlockRepository.php(63): Drupal\Core\Entity\EntityBase->access() #5 /var/www/html/beta.weavercafe/web/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php(137): Drupal\block\BlockRepository->getVisibleBlocksPerRegion() #6 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(270): Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build() #7 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare() #8 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() #9 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() #10 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func() #11 /var/www/html/beta.weavercafe/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() #12 /var/www/html/beta.weavercafe/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw() #13 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle() #14 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle() #15 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle() #16 /var/www/html/beta.weavercafe/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle() #17 /var/www/html/beta.weavercafe/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle() #18 /var/www/html/beta.weavercafe/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass() #19 /var/www/html/beta.weavercafe/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle() #20 /var/www/html/beta.weavercafe/web/modules/contrib/shield/src/ShieldMiddleware.php(270): Drupal\ban\BanMiddleware->handle() #21 /var/www/html/beta.weavercafe/web/modules/contrib/shield/src/ShieldMiddleware.php(226): Drupal\shield\ShieldMiddleware->bypass() #22 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\shield\ShieldMiddleware->handle() #23 /var/www/html/beta.weavercafe/web/modules/contrib/cloudflare/src/CloudFlareMiddleware.php(136): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() #24 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\cloudflare\CloudFlareMiddleware->handle() #25 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() #26 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle() #27 /var/www/html/beta.weavercafe/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle() #28 /var/www/html/beta.weavercafe/web/index.php(19): Drupal\Core\DrupalKernel->handle() #29 {main}";}
- 🇮🇳India Rohit Rana
Hi Duckydan, The error message indicates that the service "entity_route_context.entity_route_context" is being requested but does not exist. This can happen if the module that provides this service is not enabled or if there is an issue with the module's configuration.
Ensure that the module providing the "entity_route_context.entity_route_context" service is enabled. You can do this by going to the Extend page (/admin/modules) and verifying that the module is enabled.
Clear Cache: Sometimes, Drupal's cache can cause issues with missing services. Try clearing Drupal's cache.
Check Dependencies: If the module depends on other modules, make sure that all dependencies are met and that the required modules are enabled.
Review Configuration: Review the module's configuration to see if there are any settings related to the "entity_route_context.entity_route_context" service. Make sure that the configuration is set up correctly.
- 🇺🇸United States duckydan
Thank you for the response.
That is kinda my point. If you uninstall it, there are configurations that don't get updated back to not using the module's context options.
For example, if a block is viewable by a user group, and you have it set to "Logged in user", then you uninstall the module (not talking about removing it via composer, the files are still there), it should just switch it back to using the role in the core visibility. It does not. Thus, the error.
- 🇺🇸United States duckydan
It turned out it was a problem with a single set of configs. For some reason, the Asset Injector module had a problem with the settings concerning the parameters for each asset being injected on the page after this module was installed. I manually fixed the config for those items and all is well.
- Status changed to Closed: works as designed
9 months ago 2:53am 11 March 2024