Error: Class "Drupal\rules\Core\RulesConditionBase" not found in include()

Created on 4 December 2022, about 2 years ago
Updated 25 August 2023, over 1 year ago

Problem/Motivation

When trying to edit blocks, I'm getting the following error:

Type 	php
Date 	Sunday, December 4, 2022 - 14:42
User 	webmaster
Location 	https://drupal.local/admin/structure/block/manage/my_custom_block?destination=%2Fadmin%2Fstructure%2Fblock
Referrer 	https://drupal.local/admin/structure/block
Message 	Error: Class "Drupal\rules\Core\RulesConditionBase" not found in include() (line 19 of /data/disk/o1/static/drupal_test_1.0/web/modules/contrib/libraries_delay_load/src/Plugin/Condition/AdminRoute.php)

#0 /data/disk/o1/static/drupal_test_1.0/vendor/composer/ClassLoader.php(478): include()
#1 /data/disk/o1/static/drupal_test_1.0/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php(96): class_exists()
#4 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(17): Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass()
#5 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/Condition/ConditionManager.php(59): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance()
#6 /data/disk/o1/static/drupal_test_1.0/web/core/modules/block/src/BlockForm.php(250): Drupal\Core\Condition\ConditionManager->createInstance()
#7 /data/disk/o1/static/drupal_test_1.0/web/core/modules/block/src/BlockForm.php(129): Drupal\block\BlockForm->buildVisibilityInterface()
#8 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/Entity/EntityForm.php(106): Drupal\block\BlockForm->form()
#9 [internal function]: Drupal\Core\Entity\EntityForm->buildForm()
#10 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/Form/FormBuilder.php(531): call_user_func_array()
#11 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/Form/FormBuilder.php(278): Drupal\Core\Form\FormBuilder->retrieveForm()
#12 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#13 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#14 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#15 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#16 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#17 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#18 /data/disk/o1/static/drupal_test_1.0/vendor/symfony/http-kernel/HttpKernel.php(159): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#19 /data/disk/o1/static/drupal_test_1.0/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#20 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#21 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#22 /data/disk/o1/static/drupal_test_1.0/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#23 /data/disk/o1/static/drupal_test_1.0/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#24 /data/disk/o1/static/drupal_test_1.0/web/modules/contrib/shield/src/ShieldMiddleware.php(270): Drupal\page_cache\StackMiddleware\PageCache->handle()
#25 /data/disk/o1/static/drupal_test_1.0/web/modules/contrib/shield/src/ShieldMiddleware.php(137): Drupal\shield\ShieldMiddleware->bypass()
#26 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\shield\ShieldMiddleware->handle()
#27 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#28 /data/disk/o1/static/drupal_test_1.0/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#29 /data/disk/o1/static/drupal_test_1.0/web/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle()
#30 /data/disk/o1/static/drupal_test_1.0/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#31 {main}
Drupal Version
9.4.8

PHP
Version
8.0.20 

One solution could be to move the Rules plugins to a submodule and have Rules as dependency.

🐛 Bug report
Status

Needs review

Version

2.1

Component

Code

Created by

🇬🇧United Kingdom lexsoft London

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024