When I create a dependency on an entity reference field (taxonomy term) to have a specific term out of this vocabulary the following error shows up on the page. It appears everything is working as expected though.
Notice: Undefined index: value in Drupal\conditional_fields\Form\ConditionalFieldEditForm->submitForm() (line 316 of modules/contrib/conditional_fields/src/Form/ConditionalFieldEditForm.php).
Drupal\conditional_fields\Form\ConditionalFieldEditForm->submitForm(Array, Object) (Line: 27)
Drupal\conditional_fields\Form\ConditionalFieldEditFormTab->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 585)
Drupal\Core\Form\FormBuilder->processForm('conditional_field_edit_form_tab', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('conditional_field_edit_form_tab', 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: 38)
Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware->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)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | error_when_creating-2908866-3.patch | 853 bytes | gg24 |
| #2 | error_when_creating_dependency-2908866-1.patch | 845 bytes | romixua |
Comments
Comment #2
romixuaWe get this error not only depending on the taxonomy term.
Comment #3
gg24 commentedCreating a new patch and adding the is_object condition too.
Please review the patch.
Comment #4
guptahemant commentedhi @gg24,
I have tested the patch provided and it solves the mentioned issue.
Hence marking the issue as RTBC.
Comment #5
colanMore descriptive title.
Comment #7
colanThanks!
Comment #9
Jorge Navarro commentedUsing latest version, I still get the error after adding a dependency on a content type:
Comment #10
colan#9: This issue is closed. Please open a new one (referencing this one if it's related), or working on another open existing one if it exists. Thanks.
Comment #11
Road Kill commentedI have opened this issue again here https://www.drupal.org/project/conditional_fields/issues/3063270#comment...
Comment #12
brooke_heaton commentedDisregard.