I looked at my site and everything is OK:

- Search API is in version 1.14
- Search API Solr is in version 3.6

But every time I do drush updatedb I have the error above.

Who can help me ? Thank you

UPDATE :

I upgraded to 3.7 but that does not correct.

Comments

zenimagine created an issue. See original summary.

zenimagine’s picture

Despite the following command, it does not work. Still the error yet the mods are in the last version :

drush cr

and

composer clear-cache

mkalkbrenner’s picture

Category: Bug report » Support request
Priority: Critical » Normal

Such a drush error message appears if you use a dev snapshot of search_api. Or if you force composer to fetch from source.
Or if there's a git checkout of search_api somewhere in the path.

If you really require a dev version, there're workarounds to satisfy the check. But is that what you want?

BTW this issue isn't specific for search_api. Have a look at https://www.drupal.org/project/composer_deploy

zenimagine’s picture

@mkalkbrenner Search API is in stable version in its latest version. I do not use GIT and I installed Drupal 8 several years ago with Composer. I have never had a problem before. The error appeared on a complicated Search API Solr update.

mkalkbrenner’s picture

The "error" is on the drupal level, not composer.

For whatever reason, drupal "thinks" that search_api isn't at 1.14.
Maybe you could uninstall and reinstall the modules.

mkalkbrenner’s picture

I suggest to install https://www.drupal.org/project/composer_deploy, do the drush updb and uninstall composer_deploy again.

zenimagine’s picture

@mkalkbrenner I just installed this module but there are already problems and it does not correct the error :

ubuntu@dev-example-com /var/www/www-example-com $ composer require 'drupal/composer_deploy:^1.3'
./composer.json has been updated
Gathering patches for root package.
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
- Installing drupal/composer_deploy (1.3.0): Downloading (100%)
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating autoload files
> DrupalProject\composer\ScriptHandler::createRequiredFiles
ubuntu@dev-example-com /var/www/www-example-com $ drush en composer_deploy
[warning] file_get_contents(vendor/composer/installed.json): failed to open stream: No such file or directory ComposerDeployHandler.php:15
> [notice] Traduction de composer_deploy vérifiée.
> [notice] Translation file not found: https://ftp.drupal.org/files/translations/8.x/composer_deploy/composer_d....
> [notice] Traduction de composer_deploy vérifiée.
> [notice] Traduction du module composer_deploy téléchargée.
> [notice] Traduction de composer_deploy importée.
> [notice] Translations imported: 0 added, 4 updated, 0 removed.
> [warning] Message: A new Solr field type has been installed due to configuration changes. It is
> advisable to download and deploy an updated config.zip to your Solr server.
>
> [notice] Message: 1 fichier de traduction importé. /0/ traductions ont été ajoutées, /4/
> traductions ont été mises à jour et /0/ traductions ont été supprimées.
>
[success] Successfully enabled: composer_deploy
ubuntu@dev-example-com /var/www/www-example-com $ drush en composer_deploy
[warning] file_get_contents(vendor/composer/installed.json): failed to open stream: No such file or directory ComposerDeployHandler.php:15
[notice] Already enabled: composer_deploy
ubuntu@dev-example-com /var/www/www-example-com $ drush cr
[warning] file_get_contents(vendor/composer/installed.json): failed to open stream: No such file or directory ComposerDeployHandler.php:15
drush updatedb
[success] Cache rebuild complete.
ubuntu@dev-example-com /var/www/www-example-com $ drush updatedb
[warning] file_get_contents(vendor/composer/installed.json): failed to open stream: No such file or directory ComposerDeployHandler.php:15
[error] Search API Solr requiert ce module et cette version. Vous utilisez actuellement Search API version (Currently using Dépendance non résolue Search API (Version >=8.x-1.14 requise))

Requirements check reports errors. Do you wish to continue? (yes/no) [yes]:
>

[success] No pending updates.

mkalkbrenner’s picture

[warning] file_get_contents(vendor/composer/installed.json): failed to open stream: No such file or directory ComposerDeployHandler.php:15

Which composer version are you using?

zenimagine’s picture

@mkalkbrenner I have version 1.8.5

zenimagine’s picture

Status: Active » Fixed

@mkalkbrenner I found the solution, delete the vendor file and make composer install

mkalkbrenner’s picture

OK, thanks for the feedback.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.