Call to a member function getBackendId() on null in Drupal\ai_search\Plugin\search_api\processor\DatabaseBoostByAiSearch::supportsIndex()
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3564205. -->
Reported by: [m4olivei](https://www.drupal.org/user/410384)
Related to !33
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When I follow the steps on the project page, I get the following error when apply the recipe:</p>
<pre><pre> [error] Error: Call to a member function getBackendId() on null in Drupal\ai_search\Plugin\search_api\processor\DatabaseBoostByAiSearch::supportsIndex() (line 30 of /var/www/html/modules/contrib/ai/modules/ai_search/src/Plugin/search_api/processor/DatabaseBoostByAiSearch.php) #0 /var/www/html/modules/contrib/search_api/src/Entity/Index.php(1559): Drupal\ai_search\Plugin\search_api\processor\DatabaseBoostByAiSearch::supportsIndex() <br>#1 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(562): Drupal\search_api\Entity\Index->preSave() <br>#2 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(517): Drupal\Core\Entity\EntityStorageBase->doPreSave() <br>#3 /var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(239): Drupal\Core\Entity\EntityStorageBase->save() <br>#4 /var/www/html/core/lib/Drupal/Core/Entity/EntityBase.php(370): Drupal\Core\Config\Entity\ConfigEntityStorage->save() <br>#5 /var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(618): Drupal\Core\Entity\EntityBase->save() <br>#6 /var/www/html/core/lib/Drupal/Core/Config/ConfigManager.php(208): Drupal\Core\Config\Entity\ConfigEntityBase->save() <br>#7 /var/www/html/core/lib/Drupal/Core/Extension/ModuleInstaller.php(575): Drupal\Core\Config\ConfigManager->uninstall() <br>#8 /var/www/html/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(91): Drupal\Core\Extension\ModuleInstaller->uninstall() <br>#9 /var/www/html/core/lib/Drupal/Core/Config/ConfigImporter.php(910): Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall() <br>#10 /var/www/html/core/lib/Drupal/Core/Config/ConfigImporter.php(632): Drupal\Core\Config\ConfigImporter->processExtension() <br>#11 /var/www/html/core/lib/Drupal/Core/Config/ConfigImporter.php(569): Drupal\Core\Config\ConfigImporter->processExtensions() <br>#12 /var/www/html/core/lib/Drupal/Core/Config/ConfigImporter.php(542): Drupal\Core\Config\ConfigImporter->doSyncStep() <br>#13 /var/www/html/core/lib/Drupal/Core/Recipe/RecipeCommand.php(184): Drupal\Core\Config\ConfigImporter->import() <br>#14 /var/www/html/core/lib/Drupal/Core/Recipe/RecipeCommand.php(133): Drupal\Core\Recipe\RecipeCommand->rollBackToCheckpoint() <br>#15 /var/www/html/vendor/symfony/console/Command/Command.php(318): Drupal\Core\Recipe\RecipeCommand->execute() <br>#16 /var/www/html/vendor/symfony/console/Application.php(1092): Symfony\Component\Console\Command\Command->run() <br>#17 /var/www/html/vendor/drush/drush/src/Application.php(201): Symfony\Component\Console\Application->doRunCommand() <br>#18 /var/www/html/vendor/symfony/console/Application.php(341): Drush\Application->doRunCommand() <br>#19 /var/www/html/vendor/symfony/console/Application.php(192): Symfony\Component\Console\Application->doRun() <br>#20 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(113): Symfony\Component\Console\Application->run() <br>#21 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun() <br>#22 /var/www/html/vendor/drush/drush/drush.php(140): Drush\Runtime\Runtime->run() <br>#23 /var/www/html/vendor/bin/drush.php(119): include('...') <br>#24 {main}.</pre></pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<ul>
<li>ddev drush si -y demo_umami</li>
<li>ddev composer require drupal/amazeeio_umami_search</li>
<li>ddev composer require drupal/ai_provider_amazeeio</li>
<li>ddev drush en -y ai_provider_amazeeio</li>
<li>Setup ai_provider_amazeeio with successful connection</li>
<li>ddev drush en -y ai_search</li>
<li>ddev drush recipe recipes/amazeeio_umami_search --input amazeeio_umami_search.postgres_db_default_database=db_[hash]</li>
</ul>
<p>On this last step, I get the above error.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue