DRUPAL maintenance: drush cr,mysql server has gone away, insert into cache_default
Mysql has gone away on drush cr
Has a DRUPAL module been "snatched"?
Evolving functionalities on your website
Your DRUPAL website lives. Its content and functions evolve.
Adding or removing modules?
In the case of deletion, please follow the steps below:
- step 1: uninstall the extension in Drupal, via the back office or the drush command
drush pmu <nom_du_module>
- step 2: delete the module via compose
composer remove drupal/<nom_du_module>
If you forget step 1, what happens?
You deleted the directory in step 2, without uninstalling the module in Drupal.
Drupal still holds in its database the configuration of a module whose directory has been removed from the project.
This is what causes the message, which is not eloquent, when executing the "drush cr" command:
Mysql has gone away...
Too bad, the message doesn't indicate the name of the missing module.
If you've had the good sense to use GIT, the history of the composer.json file should tell you which modules have been "ripped" from your Drupal project tree.
How do I remove the error message?
1. Reinstall the missing module via compose.
composer require drupal/<nom_du_module>
You can use the project page on drupal.org.
2. Carry out the two de-intallation steps.
step 1: uninstall the extension in Drupal, via the back office or the drush command
drush pmu <nom_du_module>
step 2: delete the module via compose
composer remove drupal/<nom_du_module>