0

In this case it was webform. Webform services wouldn't load, I couldn't clear cache, clearing db caches manually wouldn't work. All I got was:

[Thu May 07 14:37:33.174757 2020] [php7:notice] [pid 2795] [client x.x.x.x:25119] Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: The service "webform_scheduled_email.manager" has a dependency on a non-existent service "webform.token_manager". in /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php on line 31 #0 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(60): Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Object(Symfony\\Component\\DependencyInjection\\Reference), false)\n#1 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(28): Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass->processValue(Array, false)\n#2 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(67): Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Array)\n#3 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(28): Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass->processValue(Object(Symfony\\Component\\DependencyInjection\\Definition), true)\n#4 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(60): Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Object(Symfony\\Component\\DependencyInjection\\Definition), true)\n#5 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(28): Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass->processValue(Array, true)\n#6 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(39): Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Array, true)\n#7 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/Compiler.php(140): Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass->process(Object(Drupal\\Core\\DependencyInjection\\ContainerBuilder))\n#8 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/ContainerBuilder.php(789): Symfony\\Component\\DependencyInjection\\Compiler\\Compiler->compile(Object(Drupal\\Core\\DependencyInjection\\ContainerBuilder))\n#9 /var/www/html/www.actionfund.org/web/core/lib/Drupal/Core/DrupalKernel.php(1321): Symfony\\Component\\DependencyInjection\\ContainerBuilder->compile()\n#10 /var/www/html/www.actionfund.org/web/core/lib/Drupal/Core/DrupalKernel.php(902): Drupal\\Core\\DrupalKernel->compileContainer()\n#11 /var/www/html/www.actionfund.org/web/core/lib/Drupal/Core/DrupalKernel.php(477): Drupal\\Core\\DrupalKernel->initializeContainer()\n#12 /var/www/html/www.actionfund.org/web/core/lib/Drupal/Core/DrupalKernel.php(693): Drupal\\Core\\DrupalKernel->boot()\n#13 /var/www/html/www.actionfund.org/web/index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#14 {main}

Reinstall drupal wouldn't fix it (once custom modules were in). Deleting vendor and composer install wouldn't fix it. Reloading DB had no effect. None of the usual tricks worked. I was pulling my hair out.

2

A contractor had added a directory called "webform" to modules/custom to add some custom configurations to webform. Which worked fine after updating webform module, until you cleared cache. Then Drupal blew up with the above error (similar from drush side) and I got puzzled silence on the call with them.

Turns out Drupal looks in custom first, for module directories, and ignores directories of the same name in contrib. When other stuff tried to reference services in the contrib module, drupal stopped looking for stuff in "webform" at the custom directory of the same name and died.

Hopefully this saves someone some time. Learn from our folly!

Changing the name custom/webform to custom/SITE_NAME_webform (with .info.yml etc name changes) fixed issue.

They're killing me.

| improve this answer | |
  • ok. something to 'quiz' future contractors about perhaps ... "when creating a module to customise an existing module, what would you name the directory, and where would you put it, and why?" – petednz - fuzion May 7 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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