When trying to uninstall Rules (drupal 9), my site did this. I've tried everything to get it back but it will not come back on. Any suggestions before I do a restore. Thanks
The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\Core\Plugin\Context\Context::__construct() must implement interface Drupal\Core\Plugin\Context\ContextDefinitionInterface, instance of __PHP_Incomplete_Class given, called in /home/recordin/public_html/core/lib/Drupal/Core/Plugin/ContextAwarePluginTrait.php on line 85 in Drupal\Core\Plugin\Context\Context->__construct() (line 50 of core/lib/Drupal/Core/Plugin/Context/Context.php).
Drupal\Core\Plugin\Context\Context->__construct(Object) (Line: 85)
Drupal\Core\Executable\ExecutablePluginBase->getContext('node') (Line: 101)
Drupal\Core\Plugin\Context\ContextHandler->applyContextMapping(Object, Array) (Line: 98)
Drupal\theme_switcher\Theme\ThemeSwitcherNegotiator->applies(Object) (Line: 67)
Drupal\Core\Theme\ThemeNegotiator->determineActiveTheme(Object) (Line: 405)
Drupal\Core\Theme\ThemeManager->initTheme(Object) (Line: 96)
Drupal\Core\Theme\ThemeManager->getActiveTheme() (Line: 43)
Drupal\Core\Cache\Context\ThemeCacheContext->getContext(NULL) (Line: 118)
Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys(Array) (Line: 307)
Drupal\Core\Render\RenderCache->createCacheID(Array) (Line: 66)
Drupal\Core\Render\RenderCache->get(Array) (Line: 109)
Drupal\Core\Render\PlaceholderingRenderCache->get(Array) (Line: 265)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 241)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Ob (Line: 50)ject, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 706)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comments
Comment #2
TR CreditAttribution: TR commentedComment #3
TR CreditAttribution: TR commented1) You selected 8.x-3.0-alpha5 as the version you're using. That is an old version. Old versions in Drupal can't be changed or fixed, so if there is a problem with an old version it's not a bug UNLESS the same problem exists in a current version. When you report a bug, please first upgrade to the current -dev version and test to see if you still have the problem.
2) I installed Rules 8.x-3.0-alpha5 on simplytest.me, then I uninstalled it using the UI at /admin/modules/uninstall. There were no problems, and Rules uninstalled cleanly. So if there is a problem, it involves some part of the process that you haven't mentioned. You don't mention how you tried to uninstall Rules, and you don't mention any other modules you have installed that may be using Rules. And you don't mention what reaction Rules you've created, if any. If your problem cannot be reproduced then it cannot be confirmed or fixed. Please give instructions for reproducing this error on a clean site like simplytest.me.
Comment #4
paintingguy CreditAttribution: paintingguy commentedI believe this is related https://www.drupal.org/project/rules/issues/3182336
Today I updated to the dev version and this seemed to have fixed the problem. :) Hopefully I will be able to update this from dev to stable once you have the stable version online.
Great work, thank you for making such excellent modules.
Comment #5
TR CreditAttribution: TR commentedOP indicates it is fixed for now.
Comment #6
mr_scumbagI Also get this problem when uninstalling Rules.
Reinstalling Rules made my site work again.
I'm using the Intercept Profile https://www.drupal.org/project/intercept and had an older Drupal 8 version of Intercept.
I went though the upgrade process to D9.
Took a while, but I finally got it all working on the latest version of core (9.4.5) & the latest of every module/theme.
The latest version of Intercept doesn't use Rules (but because it was previously turned on in the DB/config I had to install it to run the D9 updates).
After I got everything running, I removed the modules that are no longer used, and got this same error.
I currently have Rules turned on, and everything is fine. The second I uninstall it, I get the error mentioned above.
I tried the "install the dev version, then uninstall" but the same error happened.
Comment #7
drupalharish CreditAttribution: drupalharish commented#6 worked for me.
drush pmu rules
drush en rules