Problem/Motivation
Tried enabling the 1.x-dev version of this module (http://cgit.drupalcode.org/acquia_search_multi_subs/commit/?id=a8e82af) but ran into some errors.
Since I already had Acquia Search enabled, I had a Server and search index automatically setup.
On /admin/config/search/search-api/server/acquia_search_server/edit, when switching to "Acquia Solr Multi Sub" for the Backend of the existing "Acquia Search API Solr server”, there was an Ajax error.
I found out that this error is originating from this line:
$this->backendPlugin = $backend_plugin_manager->createInstance($this->getBackendId()
in Server::getBackend() in Drupal\search_api\Entity\Server.php
I found the following information about the error:
Drupal\Component\Plugin\Exception\PluginException: Plugin (search_api_solr_acquia_multi_subs) instance class "Drupal\acquia_search_multi_subs\Plugin\search_api\backend\SearchApiSolrAcquiaMultiSubsBackend" does not exist. in /var/www/build/html/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php on line <i>102</i>
It looks like when trying to create an instance of the Plugin, class_exists("Drupal\acquia_search_multi_subs\Plugin\search_api\backend\SearchApiSolrAcquiaMultiSubsBackend") is returning false in DefaultFactory::getPluginClass() .(Drupal\Component\Plugin\Factory\DefaultFactory.php)
Also related:
I removed the following use lines from SearchApiSolrAcquiaMultiSubsBackend.php since they did not appear to be used:
use Drupal\acquia_connector\Client;
use Drupal\acquia_connector\CryptConnector;
use Symfony\Component\Validator\Constraints\False;
Symfony\Component\Validator\Constraints\False in particular was causing the following fatal error:
PHP Fatal error: Cannot use Symfony\Component\Validator\Constraints\False as False because 'False' is a special class name in /var/www/build/html/modules/contrib/acquia_search_multi_subs/src/Plugin/search_api/backend/SearchApiSolrAcquiaMultiSubsBackend.php on line 15"
When creating a new Server with the "Acquia Solr Multi Sub" Backend selected, save results in another fatal error:
PHP Fatal error: Class 'Solarium\Core\Plugin\AbstractPlugin' not found in /var/www/build/html/modules/contrib/acquia_search_multi_subs/src/EventSubscriber/SearchSubscriber.php on line 12"
This problem is different as it appears that the error is coming from attempting to create a new SearchSubscriber() in SearchApiSolrAcquiaMultiSubsBackend::connect()
Comments
Comment #2
mirie commentedComment #3
snufkin commentedWhat version of search api and search api solr and Solr version have you tested with?
Comment #4
mirie commentedHi snufkin,
I had the following.
I'm testing next with:
Comment #5
jhedstromRunning the latest dev release of both
search_apiandsearch_api_solr, I get a different error when editing a server to move it to multi-subs:Comment #6
jhedstromDidn't mean to change priority.
Comment #7
mirie commentedI don't know why yesterday's revision of the issue summary disappeared. Re-updating.
Comment #8
mirie commentedConfirmed that with:
- Search API: 1.0-alpha13
- Search API Solr: 1.x.-dev
after removing the
use Symfony\Component\Validator\Constraints\False;line in SearchApiSolrAcquiaMultiSubsBackend.php, I still get the errorPHP Fatal error: Class 'Solarium\Core\Plugin\AbstractPlugin' not found in /var/www/build/html/modules/contrib/acquia_search_multi_subs/src/EventSubscriber/SearchSubscriber.php on line 12"when attempting to save a new solr server. Similarly get an Ajax error when trying to switch the backend for an existing Acquia search server configuration.
Comment #9
snufkin commentedHmm what version of solarium are you using? If this is an issue with the library compatibility, then it will be a problem with Acquia Search as well since that is also extending this class.
Comment #10
mirie commentedUsing: solarium/solarium:3.4.1 -- the version listed in the composer.json in search_api_solr
Comment #11
mpp commented