Should I worry about this warning ?

57 views
Skip to first unread message

gi...@shaw.ca

unread,
Apr 23, 2024, 1:31:56 PMApr 23
to islandora
Running latest Islandora on Drupal 10 and get these two warnings on object ingestion:

Warning: Undefined variable $edtf in Drupal\controlled_access_terms\Plugin\search_api\processor\EDTFYear->addFieldValues() (line 154 of /var/www/html/drupal/web/modules/contrib/controlled_access_terms/src/Plugin/search_api/processor/EDTFYear.php)

#0 /var/www/html/drupal/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real(2, 'Undefined varia...', '/var/www/html/d...', 154)
#1 /var/www/html/drupal/web/modules/contrib/controlled_access_terms/src/Plugin/search_api/processor/EDTFYear.php(154): _drupal_error_handler(2, 'Undefined varia...', '/var/www/html/d...', 154)
#2 /var/www/html/drupal/web/modules/contrib/search_api/src/Item/Item.php(281): Drupal\controlled_access_terms\Plugin\search_api\processor\EDTFYear->addFieldValues(Object(Drupal\search_api\Item\Item))
#3 /var/www/html/drupal/web/modules/contrib/search_api/src/Entity/Index.php(987): Drupal\search_api\Item\Item->getFields()
#4 /var/www/html/drupal/web/modules/contrib/search_api/src/Utility/PostRequestIndexing.php(92): Drupal\search_api\Entity\Index->indexSpecificItems(Array)
#5 /var/www/html/drupal/web/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php(51): Drupal\search_api\Utility\PostRequestIndexing->destruct()
#6 [internal function]: Drupal\Core\EventSubscriber\KernelDestructionSubscriber->onKernelTerminate(Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#7 /var/www/html/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#8 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(115): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...')
#9 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(63): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\LocalRedirectResponse))
#10 /var/www/html/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(688): Drupal\Core\StackMiddleware\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\LocalRedirectResponse))
#11 /var/www/html/drupal/web/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\LocalRedirectResponse))
#12 {main}

  Warning: Undefined array key 2 in Drupal\controlled_access_terms\Plugin\search_api\processor\EDTFYear->addFieldValues() (line 142 of /var/www/html/drupal/web/modules/contrib/controlled_access_terms/src/Plugin/search_api/processor/EDTFYear.php)

#0 /var/www/html/drupal/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real(2, 'Undefined array...', '/var/www/html/d...', 142)
#1 /var/www/html/drupal/web/modules/contrib/controlled_access_terms/src/Plugin/search_api/processor/EDTFYear.php(142): _drupal_error_handler(2, 'Undefined array...', '/var/www/html/d...', 142)
#2 /var/www/html/drupal/web/modules/contrib/search_api/src/Item/Item.php(281): Drupal\controlled_access_terms\Plugin\search_api\processor\EDTFYear->addFieldValues(Object(Drupal\search_api\Item\Item))
#3 /var/www/html/drupal/web/modules/contrib/search_api/src/Entity/Index.php(987): Drupal\search_api\Item\Item->getFields()
#4 /var/www/html/drupal/web/modules/contrib/search_api/src/Utility/PostRequestIndexing.php(92): Drupal\search_api\Entity\Index->indexSpecificItems(Array)
#5 /var/www/html/drupal/web/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php(51): Drupal\search_api\Utility\PostRequestIndexing->destruct()
#6 [internal function]: Drupal\Core\EventSubscriber\KernelDestructionSubscriber->onKernelTerminate(Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#7 /var/www/html/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#8 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(115): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...')
#9 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(63): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\LocalRedirectResponse))
#10 /var/www/html/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(688): Drupal\Core\StackMiddleware\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\LocalRedirectResponse))
#11 /var/www/html/drupal/web/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\LocalRedirectResponse))
#12 {main}

Looks like I need to define an array and a variable but I am not quite sure where..
I am thinking I could let it go but if I can get rid of the warning that would be good.

Thanks

Joe Corall

unread,
Apr 24, 2024, 2:55:11 PMApr 24
to islandora
Hello,

A new version of controlled_access_terms was just released (version 2.4.1) that will help with this error. Please upgrade your site to that version of the module.

You'll also want to check your EDTF Year settings at the bottom of /admin/config/search/search-api/index/default_solr_index/processors
have the correct fields selected. A recent configuration change on that module caused the settings in that form to be stored in a different format. You'll want to be sure to select the fields you want added to your EDTF year setting and click "Save" when you're finished.

After you upgrade the module and perform the above steps, those watchdog entries should stop.

Screen Shot 2024-04-24 at 14.28.12.png"

gi...@shaw.ca

unread,
Apr 25, 2024, 6:29:14 PMApr 25
to islandora
Thank you. I will get that implemented and report back if I run into any issues.
Reply all
Reply to author
Forward
0 new messages