Error: Call to a member function moduleExists() on null in Drupal\field_validation\Form\FieldValidationRuleFormBase->buildForm()

Created on 26 July 2023, over 1 year ago
Updated 27 July 2023, over 1 year ago

Problem/Motivation

When creating a new rule in a rule set, this error comes up:

Error: Call to a member function moduleExists() on null in Drupal\field_validation\Form\FieldValidationRuleFormBase->buildForm() (line 206 of modules/contrib/field_validation/src/Form/FieldValidationRuleFormBase.php).
Drupal\field_validation\Form\FieldValidationRuleFormBase->buildForm(Array, Object, Object, 'regex_field_validation_rule') (Line: 51)
Drupal\field_validation\Form\FieldValidationRuleAddForm->buildForm(Array, Object, Object, 'regex_field_validation_rule', '')
call_user_func_array(Array, Array) (Line: 534)
Drupal\Core\Form\FormBuilder->retrieveForm('field_validation_rule_form', Object) (Line: 281)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

My environnement :
PHP 8.1
Drupal 9.5.8

Steps to reproduce

  • Create new "Validation Rule Set" for content
  • Try to create new "Rule" for regex (I tried Min-Man, unique and numeric, they all yield the same error)
πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024