I haven't upgrade Drupal for more than 6 months now. Today, I upgraded to Drupal v8.9.3 and all the modules. Then I got the error message "The website encountered an unexpected error." Going to any pages and it is showing that error message. My whole website was down. Then, I tried the /update.php
page, it showed the message that the "Token modules has a schema key/value store missing"(Don't remember the exact wording) and it is referring to https://www.drupal.org/node/3137656, which is not helpful.
Then, I ran drush ws
and it is showing the following error message.
Drush command terminated abnormally due to an unrecoverable error.
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "pathauto.generator" has a dependency on a non-existent service "token.entity_mapper". in Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processValue() (line 31 of /home4/openwrit/public_html/opw/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php).
At that moment, I can't run anything with drush, can't disable nor uninstall any module.
After searching on Google, I found this issue https://github.com/md-systems/pathauto/issues/128 but the resolution on that issue doesn't work for me. I extracted and overwrote Token, Ctools and PathAuto directories but it still showed that error.
Solution
By luck, I decided to delete PathAuto folder and run /update.php
. And, it worked. Then, I proceed to install all the other modules and finally reinstall PathAuto.