Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[module:install] Call to undefined function Drupal\Console\Command\Shared\system_rebuild_module_data() #4293

Open
extect opened this issue Jan 9, 2021 · 3 comments

Comments

@extect
Copy link

extect commented Jan 9, 2021

Problem/Motivation

When trying to install a new module using module:install command, the following error is thrown:

Error: Call to undefined function Drupal\Console\Command\Shared\system_rebuild_module_data() in /var/www/vendor/drupal/console/src/Command/Shared/ProjectDownloadTrait.php on line 178 #0 /var/www/vendor/drupal/console/src/Command/Shared/ProjectDownloadTrait.php(117): Drupal\Console\Command\Module\InstallCommand->calculateDependencies(Array) #1 /var/www/vendor/drupal/console/src/Command/Module/InstallCommand.php(222): Drupal\Console\Command\Module\InstallCommand->downloadModules(Array, false) #2 /var/www/vendor/symfony/console/Command/Command.php(255): Drupal\Console\Command\Module\InstallCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #3 /var/www/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #4 /var/www/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Drupal\Console\Command\Module\InstallCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #5 /var/www/vendor/drupal/console-core/src/Application.php(187): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #6 /var/www/vendor/drupal/console/src/Application.php(64): Drupal\Console\Core\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #7 /var/www/vendor/symfony/console/Application.php(149): Drupal\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #8 /var/www/vendor/drupal/console/bin/drupal.php(89): Symfony\Component\Console\Application->run() #9 /var/www/vendor/drupal/console/bin/drupal(4): require('/var/www/vendor...') #10 {main} Error: Call to undefined function Drupal\Console\Command\Shared\system_rebuild_module_data() in Drupal\Console\Command\Module\InstallCommand->calculateDependencies() (line 178 of /var/www/vendor/drupal/console/src/Command/Shared/ProjectDownloadTrait.php).

How to reproduce

  • Install Drupal 9.1.2 using composer
  • Install Drupal Console 1.9.7
  • Require any module you like, (e.g. drupal/admin_toolbar)
  • Install module via console command (drupal moi admin_toolbar)
  • Error is thrown

Same error is thrown, when using module:uninstall for any module that is already installed.

Solution

This seems to be similar to #4265, but this error occurs with a different command and the PR mentioned (#4277) does not solve the error outlined above.

@jacerider
Copy link

I am getting the same error when running drupal debug:module.

@jacerider
Copy link

The reason this fails is the function was deprecated and removed in Drupal 9.
https://www.drupal.org/project/devel/issues/3100242

@komlenic
Copy link

komlenic commented Nov 3, 2021

Drupal 9.27
Drupal Console 1.9.7
Same results as above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants