I get the following error while submitting a form with conditional fields:

The website encountered an unexpected error. Please try again later.
Recoverable fatal error: Argument 1 passed to Drupal\Core\Form\FormState::setError() must be of the type array, null given, called in modules/contrib/conditional_fields/conditional_fields.api.inc on line 506 and defined in Drupal\Core\Form\FormState->setError() (line 1093 of core/lib/Drupal/Core/Form/FormState.php).
Drupal\Core\Form\FormState->setError(NULL, Object) (Line: 506)
conditional_fields_form_validate(Array, Object)
call_user_func_array('conditional_fields_form_validate', Array) (Line: 83)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 270)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'node_pgp_2017app_personal_details_form') (Line: 119)
Drupal\Core\Form\FormValidator->validateForm('node_pgp_2017app_personal_details_form', Array, Object) (Line: 571)
Drupal\Core\Form\FormBuilder->processForm('node_pgp_2017app_personal_details_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, 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: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
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: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
CommentFileSizeAuthor
#2 issue-2873008.patch879 byteshyscaler
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nettantra created an issue. See original summary.

hyscaler’s picture

Status: Active » Patch (to be ported)
FileSize
879 bytes
id.medion’s picture

Status: Patch (to be ported) » Postponed (maintainer needs more info)

Hi nettantra,

Could you please provide steps to reproduce (field types and field widgets)? How to create a good description for an issue you can read here https://www.drupal.org/issue-queue/how-to.

Best regards.

hyscaler’s picture

Have added the issue here: https://www.drupal.org/node/2873406

OlgaRabodzei’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

I close as the new issue was created (https://www.drupal.org/node/2873406)