Tried this both with the latest dev and alpha version of search_api and search_api_solr - same behaviour with both setups.

After having installed Drupal and the modules listed above, any attempt to access /admin/config/search/search-api/index/acquia_search_index/fields results in

Drupal\search_api\SearchApiException: Could not retrieve data definition for field 'Item language' on index 'Acquia Search Solr Index'. in Drupal\search_api\Item\Field->getDataDefinition() (line 400 of /Users/john.takousis/Sites/devdesktop/d8demobreak/web/modules/contrib/search_api/src/Item/Field.php).

Indexing attempts fail with a similar error

Drupal\search_api\SearchApiException while trying to index items on index Acquia Search Solr Index: Could not retrieve data definition for field 'Item language' on index 'Acquia Search Solr Index'. in Drupal\search_api\Item\Field->getDataDefinition() (line 400 of /Users/john.takousis/Sites/devdesktop/d8demobreak/web/modules/contrib/search_api/src/Item/Field.php)

Tried with a local Solr server (so no acquia_search involved) and was able to add fields and index content as expected which would indicate that the issue is with acquia_connector

Comments

magtak created an issue. See original summary.

tnfno’s picture

I have the same error on installation where there are no Acquia modules involved.

Drupal\search_api\SearchApiException while trying to index items on [error]
index Default content index: Could not retrieve data definition for
field 'Item language' on index 'Default content index'. in
Drupal\search_api\Item\Field->getDataDefinition() (line 400 of
/var/www/html/c345/d8/modules/search_api/src/Item/Field.php)

tnfno’s picture

Found this thread https://www.drupal.org/node/2230771

Disabling and re enabling the search server as described fixed the problem for me.

magtak’s picture

@tnfno You are getting this error simply with search_api and search_api_solr?

Also disabling/re-enabling had no effect on my installation.

stanislav mixnovich’s picture

@magtak You can try manually remove the search_api_language field. https://www.drupal.org/node/2735325#comment-11284917 or use Search API 8.x-1.0-alpha14

https://www.drupal.org/node/2732339

magtak’s picture

@Stanislav I can't even access /admin/config/search/search-api/index/[index_id]/fields to remove the field sadly - it WSOD's with the same error. That's with the latest dev versions of search_api, search_api_solr, and acquia_search.

I have made it work using

search_api-8.x-1.0-alpha14
search_api_solr-8.x-1.0-alpha3
acquia_connector-8.x-1.x-dev

and I will try with more recent versions of search_api_solr. EDIT: that is the latest module version combination that works.

Given my limited data so far I think acquia_connector (acquia_search) plays well with search_api-8.x-1.0-alpha14 & search_api_solr-8.x-1.0-alpha3 but not more recent versions.

janusman’s picture

Status: Active » Closed (outdated)

Outdated.

jigarius’s picture

Status: Closed (outdated) » Active

Hi! I'm facing this same problem with Acquia Connector 8.1.14. What is the correct way to resolve this issue?

Firstly, I get

Error: Class 'Solarium\Core\Plugin\Plugin' not found in
/drupal/docroot/modules/contrib/acquia_connector/acquia_search/src/EventSubscriber/SearchSubscriber.php, line 24

during acquia_search installation - I have Solarium 4.0 already installed (using composer). Is there a specific version I should install?

Secondly, I get these errors when trying to enable the Acquia Search server:

Drupal\search_api\SearchApiException while computing Views data for index Acquia Search Solr Index: Could not retrieve data definition for field 'Item language' on index 'Acquia Search Solr Index'. in Drupal\search_api\Item\Field->getDataDefinition() (line 441 of /drupal/docroot/modules/contrib/search_api/src/Item/Field.php).
Drupal\search_api\SearchApiException while adding Views handlers for field Item language on index Acquia Search Solr Index: Could not retrieve data definition for field 'Item language' on index 'Acquia Search Solr Index'. in Drupal\search_api\Item\Field->getDataDefinition() (line 441 of /drupal/docroot/modules/contrib/search_api/src/Item/Field.php).

Any help will be appreciated. All this happens only with the Acquia Connector module. Things work nicely when I use the Solr Multilingual server.

mxh’s picture

I have Solarium 4.0 already installed (using composer). Is there a specific version I should install?

Probably"solarium/solarium": "3.8.*" is the last version which works with acquia_connector.

danepowell’s picture

Status: Active » Closed (outdated)

Indeed, Acquia Connector 8.x-1.x only works with Search API Solr 8.x-1.x, which only works with Solarium 3. If this is still an issue with that combination of modules, feel free to reopen. Thanks.