An error is appearing every time I save the form on the processors tab: /web/admin/config/search/search-api/index/content_index/processors
It only happens when "Enable on all supported fields" is selected, for example with ignore case processor.
Edit: and when there are no fields being indexed as "fulltext" so no fields are available to select in the processor settings.
Notice: Undefined index: #options in Drupal\search_api\Processor\FieldsProcessorPluginBase->validateConfigurationForm() (line 271 of modules/contrib/search_api/src/Processor/FieldsProcessorPluginBase.php).
Drupal\search_api\Processor\FieldsProcessorPluginBase->validateConfigurationForm(Array, Object) (Line: 276)
Drupal\search_api\Form\IndexProcessorsForm->validateForm(Array, Object)
call_user_func_array(Array, Array) (Line: 83)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 270)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'search_api_index_processors_form') (Line: 119)
Drupal\Core\Form\FormValidator->validateForm('search_api_index_processors_form', Array, Object) (Line: 571)
Drupal\Core\Form\FormBuilder->processForm('search_api_index_processors_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm(Object, 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: 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)
Warning: array_keys() expects parameter 1 to be array, null given in Drupal\search_api\Processor\FieldsProcessorPluginBase->validateConfigurationForm() (line 271 of modules/contrib/search_api/src/Processor/FieldsProcessorPluginBase.php).
Drupal\search_api\Processor\FieldsProcessorPluginBase->validateConfigurationForm(Array, Object) (Line: 276)
Drupal\search_api\Form\IndexProcessorsForm->validateForm(Array, Object)
call_user_func_array(Array, Array) (Line: 83)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 270)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'search_api_index_processors_form') (Line: 119)
Drupal\Core\Form\FormValidator->validateForm('search_api_index_processors_form', Array, Object) (Line: 571)
Drupal\Core\Form\FormBuilder->processForm('search_api_index_processors_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm(Object, 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: 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)
Notice: Undefined index: #options in Drupal\search_api\Processor\FieldsProcessorPluginBase->validateConfigurationForm() (line 271 of modules/contrib/search_api/src/Processor/FieldsProcessorPluginBase.php).
Drupal\search_api\Processor\FieldsProcessorPluginBase->validateConfigurationForm(Array, Object) (Line: 97)
Drupal\search_api\Plugin\search_api\processor\IgnoreCharacters->validateConfigurationForm(Array, Object) (Line: 276)
Drupal\search_api\Form\IndexProcessorsForm->validateForm(Array, Object)
call_user_func_array(Array, Array) (Line: 83)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 270)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'search_api_index_processors_form') (Line: 119)
Drupal\Core\Form\FormValidator->validateForm('search_api_index_processors_form', Array, Object) (Line: 571)
Drupal\Core\Form\FormBuilder->processForm('search_api_index_processors_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm(Object, 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: 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)
Warning: array_keys() expects parameter 1 to be array, null given in Drupal\search_api\Processor\FieldsProcessorPluginBase->validateConfigurationForm() (line 271 of modules/contrib/search_api/src/Processor/FieldsProcessorPluginBase.php).
Drupal\search_api\Processor\FieldsProcessorPluginBase->validateConfigurationForm(Array, Object) (Line: 97)
Drupal\search_api\Plugin\search_api\processor\IgnoreCharacters->validateConfigurationForm(Array, Object) (Line: 276)
Drupal\search_api\Form\IndexProcessorsForm->validateForm(Array, Object)
call_user_func_array(Array, Array) (Line: 83)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 270)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'search_api_index_processors_form') (Line: 119)
Drupal\Core\Form\FormValidator->validateForm('search_api_index_processors_form', Array, Object) (Line: 571)
Drupal\Core\Form\FormBuilder->processForm('search_api_index_processors_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm(Object, 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: 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)
Comments
Comment #2
mchelenIssue occurs when there are no fields being indexed as "fulltext" and so nothing is available to select in the processor settings.
Comment #3
mchelenComment #4
drunken monkeyYou're right, thanks a lot for reporting! It's not even just broken if there are no fields to select – it's broken in general. I don't think this ever worked. Apparently, no-one really tested this (with error reporting turned on) before we committed it.
Anyways, it's very easy to fix: see (and please test) the attached patch.
Also, since we also write that information when the index is saved, I don't think this really had any effect, other than the notice.
Comment #5
maaty388 commentedThank you, "error" is gone.
Comment #7
drunken monkeyGood to hear, thanks a lot for testing!
Committed.