Notice: Undefined offset: 1

Created on 27 August 2023, 10 months ago
Updated 1 October 2023, 9 months ago

Drupal Version
9.5.10

PHP Version
7.4.33
DatabaseVersion
10.4.25-MariaDB-log
System
MariaDB

When I navigate to this page I see this error, we started noticing this issue when cron runs. Started doing database logging and found the error also appears when I go to the edit view. (See below)

admin/config/search/search-api/index/{some name}/edit

Notice: Undefined offset: 1 in Drupal\search_api_db\Plugin\search_api\backend\Database->__construct() (line 193 of /code/web/modules/contrib/search_api/modules/search_api_db/src/Plugin/search_api/backend/Database.php)

#0 /code/web/core/includes/bootstrap.inc(347): _drupal_error_handler_real(8, 'Undefined offse...', '/code/web/modul...', 193)
#1 /code/web/modules/contrib/search_api/modules/search_api_db/src/Plugin/search_api/backend/Database.php(193): _drupal_error_handler(8, 'Undefined offse...', '/code/web/modul...', 193, Array)
#2 /code/web/modules/contrib/search_api/src/Plugin/ConfigurablePluginBase.php(39): Drupal\search_api_db\Plugin\search_api\backend\Database->__construct(Array, 'search_api_db', Array)
#3 /code/web/modules/contrib/search_api/src/Backend/BackendPluginBase.php(94): Drupal\search_api\Plugin\ConfigurablePluginBase::create(Object(Drupal\Core\DependencyInjection\Container), Array, 'search_api_db', Array)
#4 /code/web/modules/contrib/search_api/modules/search_api_db/src/Plugin/search_api/backend/Database.php(204): Drupal\search_api\Backend\BackendPluginBase::create(Object(Drupal\Core\DependencyInjection\Container), Array, 'search_api_db', Array)
#5 /code/web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(21): Drupal\search_api_db\Plugin\search_api\backend\Database::create(Object(Drupal\Core\DependencyInjection\Container), Array, 'search_api_db', Array)
#6 /code/web/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('search_api_db', Array)
#7 /code/web/modules/contrib/search_api/src/Entity/Server.php(149): Drupal\Component\Plugin\PluginManagerBase->createInstance('search_api_db', Array)
#8 /code/web/modules/contrib/search_api_solr/search_api_solr.module(689): Drupal\search_api\Entity\Server->getBackend()
#9 /code/web/modules/contrib/search_api_solr/search_api_solr.module(764): search_api_solr_get_servers(false)
#10 /code/web/modules/contrib/search_api_solr/search_api_solr.module(217): _search_api_solr_visibility()
#11 /code/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(562): search_api_solr_form_search_api_index_form_alter(Array, Object(Drupal\Core\Form\FormState), 'search_api_inde...')
#12 /code/web/core/lib/Drupal/Core/Form/FormBuilder.php(840): Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object(Drupal\Core\Form\FormState), 'search_api_inde...')
#13 /code/web/core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->prepareForm('search_api_inde...', Array, Object(Drupal\Core\Form\FormState))
#14 /code/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\search_api\Form\IndexForm), Object(Drupal\Core\Form\FormState))
#15 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#16 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#17 /code/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#19 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#20 /code/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#21 /code/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#22 /code/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /code/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /code/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /code/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /code/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /code/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /code/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /code/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#32 {main}

.

đź’¬ Support request
Status

Fixed

Version

1.29

Component

Database backend

Created by

🇺🇸United States oktboy

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

Comments & Activities

  • Issue created by @oktboy
  • Status changed to Fixed 9 months ago
  • 🇦🇹Austria drunken monkey Vienna, Austria

    Seems your site’s config is broken, specifically the search server config. It should have a value containing a colon (:) in backend_config.database – typically default:default, specifying “key” and “target” of the database to use. In your case there doesn’t seem to be a colon, so this fails. Please just change your site’s config accordingly, or recreate the search server.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024