After clearing the cache in Drupal 8 (via the UI) I got "The website encountered an unexpected error. Please try again later." error. It happened for the first time. I haven't introduced any heavy changes to the site, basically only created a field and some features (via the Features module).

I've found this error in the logs:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "password_migrate". in /.../app/vendor/symfony/dependency-injection/ContainerBuilder.php on line 800

To fix this was trying different things: clearing cache tables directly in the DB, trying drush rebuild (rebuild wasn't successful since it yelds the same error). After some time the error is different (and I don't know why):

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "ctools.paramconverter.tempstore" has a dependency on a non-existent service "user.shared_tempstore". in /.../app/vendor/symfony/dependency-injection/ Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php on line 58

I can temporarily get the site back to life by loading {cache_container} table from the old backup. But the site breaks again after clearing the cache and the first error reapers in logs.

The site is basically broken. How can I restore it? How is the {cache_container} populated, so I can reverse the process and restore what's missing based on the cache? Thanks!

  • 1
    When you get your site back, is there anything on admin/reports/status?
    – mpdonadio
    Apr 23, 2016 at 16:50
  • @MPD, thanks for the answer. Apart from "Trusted Host Settings", "Cron jobs" (to be run) and "Database version" (which I cannot update due to the error), there's also: "Entity/field definitions": "Mismatched entity and/or field definitions", but I don't think any of those is a cause of the problem.
    – Adr
    Apr 24, 2016 at 11:05

2 Answers 2


It took me a while, but I managed to find the issue and to solve it.

The problem was directly caused by the Features module (or maybe rather it was directly caused by careless me...). Anyway, a couple of hours before I cleared the cache (this is when the issue manifested itself) I had exported some configuration as new features. Normally I would use some custom names, but this time I've just swum with the tide and added the configuration to the features that Features module proposed. And one of the proposed features was "User" with machine name "user", which is exactly the same as the core module! This is why "password_migrate" service couldn't be found, Drupal was looking at the new feature instead of the core module.

Because the module name was already in core.extension configuration I didn't even have to enable it, as it was already enabled (unlike in the old {system} table there's no path to the module in the config so probably Drupal just used the first definition it found). After exporting the feature the problem was there, sleeping, and it was just when I cleared the cache some time later when the site broke (probably if the problem appeared right away I could track it down much earlier).

The problem went away as soon as I deleted the feature.

  • You saved my day!
    – develCuy
    Feb 28, 2017 at 3:07

It seems that a class is requesting the password_migrate service which does not exist.

This is usually caused when the module that supplies this service is not installed.

I suggest you search the project code for the string password_migrate to find both the requester and the provider.

  • Thanks for the answer. password_migrate service is provided by the core user module (and the service's class MigratePassword exists in the module). I couldn't find any dependency on this service, but there's a $container->setDefinition('password', $container->getDefinition('password_migrate')); call in the very same module in the UserServiceProvider class. The user module is enabled.
    – Adr
    Apr 24, 2016 at 11:12
  • What version (including minor) of drupal are you running?
    – Eyal
    Apr 24, 2016 at 11:22
  • Pretty weird. admin/reports/status says it's 8.0.6, but in web/core/CHANGELOG.txt the most recent entry is 8.0.4.
    – Adr
    Apr 24, 2016 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.