Currently on Drupal 10.5.6. Prepping for update 11.1

Upgrade Status Report says I should uninstall Context Stack 1.1.2

However when I uninstall it, it breaks the site with the following error:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "context_stack.current_content". in Drupal\Component\DependencyInjection\Container->get() (line 159 of core/lib/Drupal/Component/DependencyInjection/Container.php).

Tried clearing the cache with composer and running drush updb. Not exactly sure what I'm missing.

Hoping it's just a settings page for Context Stack that I've overlooked.

Thanks for the help!

Comments

yolandasmith’s picture

I ran into this before when uninstalling a module that other parts of the site depended on. Sometimes you need to disable dependent modules first or update the config references before uninstalling. Clearing cache alone is not always enough.

epl it team’s picture

Sorry should have started off with a full stack trace. I made sure to uninstall all dependencies first. I have no idea why the site gos down when I uninstall the Context Stack module.

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "context_stack.current_content". in Drupal\Component\DependencyInjection\Container->get() (line 159 of core/lib/Drupal/Component/DependencyInjection/Container.php).
Drupal\Core\Plugin\Context\LazyContextRepository->getRuntimeContexts() (Line: 91)
Drupal\block\BlockAccessControlHandler->checkAccess() (Line: 109)
Drupal\Core\Entity\EntityAccessControlHandler->access() (Line: 329)
Drupal\Core\Entity\EntityBase->access() (Line: 63)
Drupal\block\BlockRepository->getVisibleBlocksPerRegion() (Line: 138)
Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build() (Line: 270)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

epl it team’s picture

The problem was that I migrated from Drupal 9 to 10 last year and I had to re-add the Bartik theme.

The 3rd party theme was the issue.