Error: Call to a member function isSuccess() on null in Drupal\search_api_opensolr_security\Form\SecurityAdminForm->attachExistingIps()

Created on 3 July 2025, 8 days ago

Versions

Drupal Core: 10.4.8
Search API Solr: 4.3.10
Search API Opensolr: 2.2.3
OpenSolr Core Type [Index or Cluster]: Index
OpenSolr Core Version & Country: Chicago 9.6

Note: While trouble shooting the initial setup, I had also enabled, disabled, and re-enabled the search_api_opensolr_security sub-module. (The search index is currently working, but I can no longer edit the server or the security settings.)

Problem/Motivation

I get a PHP error when I try to edit the Search API server security settings:

Message: Error: Call to a member function isSuccess() on null in Drupal\search_api_opensolr_security\Form\SecurityAdminForm->attachExistingIps() (line 246 of /var/www/www.umass.edu/agriculture-food-environment/.blue/web/modules/contrib/sea...).

Severity: Error

Backtrace:
#0 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/modules/contrib/sea...(160): Drupal\search_api_opensolr_security\Form\SecurityAdminForm->attachExistingIps()
#1 [internal function]: Drupal\search_api_opensolr_security\Form\SecurityAdminForm->buildForm()
#2 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(536): call_user_func_array()
#3 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(284): Drupal\Core\Form\FormBuilder->retrieveForm()
#4 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(73): Drupal\Core\Form\FormBuilder->buildForm()
#5 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#6 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(123): call_user_func_array()
#7 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#8 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#9 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#10 /var/www/www.umass.edu/agriculture-food-environment/.blue/vendor/symfony/http-ker...(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#11 /var/www/www.umass.edu/agriculture-food-environment/.blue/vendor/symfony/http-ker...(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#12 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#13 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(48): Drupal\Core\StackMiddleware\Session->handle()
#14 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#15 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/modules/big_pi...(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#16 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/modules/page_c...(116): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#17 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/modules/page_c...(90): Drupal\page_cache\StackMiddleware\PageCache->pass()
#18 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/modules/ban/sr...(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
#19 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(48): Drupal\ban\BanMiddleware->handle()
#20 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#21 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#22 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#23 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/core/lib/Drupal/Cor...(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#24 /var/www/www.umass.edu/agriculture-food-environment/.blue/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#25 {main}

Steps to reproduce

Go to /admin/config/search/search-api/server/opensolr_####/opensolr-security

Proposed resolution

Possible cause: The /opensolr-security form crashes because SecurityAdminForm::attachExistingIps() calls the Opensolr β€œget IP list” REST endpoint, receives NULL instead of a PSR-7 response object, and then executes $response->isSuccess() without checks.

User interface changes

NA

API changes

NA

πŸ› Bug report
Status

Active

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States thoogend

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

Comments & Activities

Production build 0.71.5 2024