I've been getting this notice occurring on enabling the module with a form that contains a few entity references. The full error trace looks like:
Notice: Undefined index: #type in Drupal\clientside_validation\Plugin\CvValidator\MaxLength->getRules() (line 27 of modules/contrib/clientside_validation/src/Plugin/CvValidator/MaxLength.php).
Drupal\clientside_validation\Plugin\CvValidator\MaxLength->getRules(Array, Object) (Line: 38)
Drupal\clientside_validation\CvValidatorBase->addValidation(Array, Object) (Line: 55)
clientside_validation_add_validation(Array, Object, 'node_event_form') (Line: 33)
clientside_validation_form_after_build_recurse('node_event_form', Array, Object) (Line: 43)
clientside_validation_form_after_build_recurse('node_event_form', Array, Object) (Line: 43)
clientside_validation_form_after_build_recurse('node_event_form', Array, Object) (Line: 21)
clientside_validation_form_after_build(Array, Object)
call_user_func_array('clientside_validation_form_after_build', Array) (Line: 1052)
Drupal\Core\Form\FormBuilder->doBuildForm('node_event_form', Array, Object) (Line: 557)
Drupal\Core\Form\FormBuilder->processForm('node_event_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('node_event_form', Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object) (Line: 113)
Drupal\node\Controller\NodeController->add(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
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}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
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(Object, 1, 1) (Line: 207)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 121)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 75)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Resolved it with the attached patch.
| Comment | File | Size | Author |
|---|---|---|---|
| clientside_validation-maxlength.patch | 797 bytes | welly |
Comments
Comment #2
welly commentedComment #4
welly commentedCI failed because there are no tests for this module. Could I get a review on this? Thanks!
Comment #6
nikunjkotecha