The referenced entity (taxonomy_term: ABC) does not exist.

Created on 2 May 2023, over 1 year ago
Updated 22 June 2024, 5 months ago

Problem/Motivation

FirstLY, target term does not appear in the list but can be selected.

I can select then if I insist to select to go on.

When I look at recent log messages I see two warnings.

1-Severity:Debug

Deprecated function: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in _form_filter_fields_get_target_field_options() (line 162 of /var/www/html/isp/web/modules/contrib/form_filter_fields/form_filter_fields.module)
#0 /var/www/html/isp/web/core/includes/bootstrap.inc(158): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /var/www/html/isp/web/modules/contrib/form_filter_fields/form_filter_fields.module(162): strip_tags()
#3 /var/www/html/isp/web/modules/contrib/form_filter_fields/form_filter_fields.module(111): _form_filter_fields_get_target_field_options()
#4 /var/www/html/isp/web/modules/contrib/form_filter_fields/form_filter_fields.module(224): _form_filter_fields_populate_form()
#5 /var/www/html/isp/web/modules/contrib/form_filter_fields/form_filter_fields.module(36): _form_filter_fields_work()
#6 /var/www/html/isp/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(545): form_filter_fields_form_alter()
#7 /var/www/html/isp/web/core/lib/Drupal/Core/Form/FormBuilder.php(838): Drupal\Core\Extension\ModuleHandler->alter()
#8 /var/www/html/isp/web/core/lib/Drupal/Core/Form/FormBuilder.php(432): Drupal\Core\Form\FormBuilder->prepareForm()
#9 /var/www/html/isp/web/core/lib/Drupal/Core/Form/FormBuilder.php(631): Drupal\Core\Form\FormBuilder->rebuildForm()
#10 /var/www/html/isp/web/core/lib/Drupal/Core/Form/FormBuilder.php(323): Drupal\Core\Form\FormBuilder->processForm()
#11 /var/www/html/isp/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#12 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#13 /var/www/html/isp/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#14 /var/www/html/isp/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /var/www/html/isp/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#16 /var/www/html/isp/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#17 /var/www/html/isp/vendor/symfony/http-kernel/HttpKernel.php(163): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 /var/www/html/isp/vendor/symfony/http-kernel/HttpKernel.php(74): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#19 /var/www/html/isp/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#20 /var/www/html/isp/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#21 /var/www/html/isp/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#22 /var/www/html/isp/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#23 /var/www/html/isp/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#24 /var/www/html/isp/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#25 /var/www/html/isp/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#26 /var/www/html/isp/web/core/lib/Drupal/Core/DrupalKernel.php(686): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#27 /var/www/html/isp/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#28 {main}

2-Severity:Warning

Warning: Undefined array key 1 in _form_filter_fields_get_target_field_options() (line 162 of /var/www/html/isp/web/modules/contrib/form_filter_fields/form_filter_fields.module)
#0 /var/www/html/isp/web/core/includes/bootstrap.inc(158): _drupal_error_handler_real()
#1 /var/www/html/isp/web/modules/contrib/form_filter_fields/form_filter_fields.module(162): _drupal_error_handler()
#2 /var/www/html/isp/web/modules/contrib/form_filter_fields/form_filter_fields.module(111): _form_filter_fields_get_target_field_options()
#3 /var/www/html/isp/web/modules/contrib/form_filter_fields/form_filter_fields.module(224): _form_filter_fields_populate_form()
#4 /var/www/html/isp/web/modules/contrib/form_filter_fields/form_filter_fields.module(36): _form_filter_fields_work()
#5 /var/www/html/isp/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(545): form_filter_fields_form_alter()
#6 /var/www/html/isp/web/core/lib/Drupal/Core/Form/FormBuilder.php(838): Drupal\Core\Extension\ModuleHandler->alter()
#7 /var/www/html/isp/web/core/lib/Drupal/Core/Form/FormBuilder.php(432): Drupal\Core\Form\FormBuilder->prepareForm()
#8 /var/www/html/isp/web/core/lib/Drupal/Core/Form/FormBuilder.php(631): Drupal\Core\Form\FormBuilder->rebuildForm()
#9 /var/www/html/isp/web/core/lib/Drupal/Core/Form/FormBuilder.php(323): Drupal\Core\Form\FormBuilder->processForm()
#10 /var/www/html/isp/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#11 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#12 /var/www/html/isp/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#13 /var/www/html/isp/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#14 /var/www/html/isp/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#15 /var/www/html/isp/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#16 /var/www/html/isp/vendor/symfony/http-kernel/HttpKernel.php(163): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#17 /var/www/html/isp/vendor/symfony/http-kernel/HttpKernel.php(74): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#18 /var/www/html/isp/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#19 /var/www/html/isp/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#20 /var/www/html/isp/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#21 /var/www/html/isp/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#22 /var/www/html/isp/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#23 /var/www/html/isp/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#24 /var/www/html/isp/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#25 /var/www/html/isp/web/core/lib/Drupal/Core/DrupalKernel.php(686): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#26 /var/www/html/isp/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#27 {main}
πŸ› Bug report
Status

Postponed: needs info

Version

1.5

Component

Code

Created by

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

Comments & Activities

  • Issue created by @erdm
  • πŸ‡ΊπŸ‡ΈUnited States niles38

    Hi. Sorry that you're having problems.

    Is the view working correctly? Could you post what your view is?

  • Hi niles38,
    I think I solved some parts but not all.

    What I have changed is (form_filter_fields.module)
    I added "((string)" to the line blocks below...

    148: $straight_html = trim(strip_tags((string)$rendered->jsonSerialize(), "<li>"));
    156:  $rough_html = trim(strip_tags((string)$rough_html));
    162 :    strip_tags((string)$rough_html_pieces[1])
    

    Now it's working.Log warning messages and The referenced entity (taxonomy_term: ABC) does not exist warning message is gone.

    But:

    Warning is gone but it's still not working with multi-value controller(field_team). It's working with controller field with limited 1 value.
    For example I can't achieve if I want to get Barcelona and Liverpool players together.When I change controller field to unlimited values(managed field), target field can not be filtered. All players are on the list.

    Single controller is working after code revised.

    Screenshots

    View

    Term name

    Contextual Filter

  • πŸ‡ΊπŸ‡ΈUnited States niles38

    Under the Configure Contextual Filters and under "When The Filter Value Is Not Available I have "Display all results for the specified field".

    Could you send me what your preview looks like (at the bottom of the view) when you type in a number in the "Preview with contextual filters:" field? See attached.

  • Sorry , I've sent the wrong image.

    There is no problem with the view preview. Even multi-controller is working.

    Here's previews with "Display all results for the specified field"

    Barcelona id is 34 (Players: Messi,Neymar,Figo)
    Liverpool id is 37 (Players: Muhammed Salah)

    Single Controller

    Multi-Controller

    Note:FYI. There's other problem when you're editing the node. Target filter is not being filtered. It shows the whole list with other values belonging to unselected controller fields. Of course it would be better to open another issue.

  • πŸ‡ΊπŸ‡ΈUnited States niles38

    Okay, I think the problem is that this module wasn't designed for multi.

    Let me look into this more. Maybe I can add that as a feature.

    Also, when I was investigating this issue, I noticed the same thing with the edit. I'm not sure how that happened but I created another issue here: https://www.drupal.org/project/form_filter_fields/issues/3357951 πŸ› Values Not Filtering On Edit Node Fixed . I created a patch for this. If you wouldn't mind, could you test the patch to see if it works on yours?

    Thanks!

  • Ok. I'm gonna test it now.

    It would be greateful if you add multi-controller feature.

    Thanks

  • Status changed to Postponed: needs info about 1 year ago
  • πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

    @erdm, did you test that patch and did it solve your issue?

Production build 0.71.5 2024