Notice: Undefined index: tid in Drupal\term_condition\Plugin\Condition\Term->buildConfigurationForm() (line 60 of modules/contrib/term_condition/src/Plugin/Condition/Term.php).

Created on 4 June 2019, over 5 years ago
Updated 2 April 2023, almost 2 years ago

When I use the term condition module either in the Block visibility group module either in the visibility form for a block in the layout bloc i'm facing this error :
Notice: Undefined index: tid in Drupal\term_condition\Plugin\Condition\Term->buildConfigurationForm() (line 60 of modules/contrib/term_condition/src/Plugin/Condition/Term.php).

Drupal\term_condition\Plugin\Condition\Term->buildConfigurationForm(Array, Object) (Line: 104)
Drupal\block_visibility_groups\Form\ConditionFormBase->buildForm(Array, Object, Object, 'term', 'edit')
call_user_func_array(Array, Array) (Line: 518)
Drupal\Core\Form\FormBuilder->retrieveForm('block_visibility_group_condition_add_form', Object) (Line: 275)
Drupal\Core\Form\FormBuilder->buildForm('block_visibility_group_condition_add_form', 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: 582)
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: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->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: 51)
Drupal\jsonapi\StackMiddleware\FormatSetter->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 690)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

And when I want to edit the visibility condition for my block associated whith term condition, I have this error
The website encountered an unexpected error. Please try again later.InvalidArgumentException: The #default_value property has to be an entity object or an array of entity objects. in Drupal\Core\Entity\Element\EntityAutocomplete::valueCallback() (line 68 of core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php).

call_user_func_array(Array, Array) (Line: 1273)
Drupal\Core\Form\FormBuilder->handleInputElement('block_form', Array, Object) (Line: 990)
Drupal\Core\Form\FormBuilder->doBuildForm('block_form', Array, Object) (Line: 1060)
Drupal\Core\Form\FormBuilder->doBuildForm('block_form', Array, Object) (Line: 1060)
Drupal\Core\Form\FormBuilder->doBuildForm('block_form', Array, Object) (Line: 1060)
Drupal\Core\Form\FormBuilder->doBuildForm('block_form', Array, Object) (Line: 561)
Drupal\Core\Form\FormBuilder->processForm('block_form', Array, Object) (Line: 318)
Drupal\Core\Form\FormBuilder->buildForm('block_form', 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: 582)
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: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->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: 51)
Drupal\jsonapi\StackMiddleware\FormatSetter->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 690)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

How to solve this issue ?

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇫🇷France Frocher Caen

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.

  • 🇳🇿New Zealand dieuwe Auckland, NZ

    I'm closing all old issues for the 8.x-1.x-dev branch. If this issue is still relevant, please update and re-open it for the 2.0.x-dev branch.

Production build 0.71.5 2024