After upgrading Drupal core to 10.6.7, the site threw a fatal error:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException:
You have requested a non-existent service "Drupal\token\Hook\TokenThemeHooks"
The site was completely unbootstrappable — drush could not run, cache clear was not possible.
Token version: 8.x-1.17
Drupal version: 10.6.7
PHP version: 8.3.29
SQL Server driver
Steps to reproduce:
Run a Drupal site with Token 8.x-1.17
Upgrade core to 10.6.7
Site becomes completely inaccessible
Workaround:
Downgrading Token to 1.16.0 resolved the issue.
Suspected cause:
Token 8.x-1.17 registers TokenThemeHooks as an OOP hook service but something in the service registration is incompatible with Drupal 10.6.7's container.
Comments
Comment #2
ronraney commentedComment #3
jsimonis commentedAlso having the same issue.
Comment #4
berdirBacktrace? Did you visit update.php?
It works for others and tests are also ok, so something is special about your site.
Comment #5
ronraney commentedI didn't capture a backtrace. I was unable to update database. You can close this if you think it's irrelevant.
Comment #6
berdirI'm fine with keeping this open for now, but if there's an issue I need a way to reproduce, and without a backtrace I'm unlikely to be able to do so.
Comment #7
jsimonis commentedI also couldn't get to update.php. All I got was the error regardless of what page I tried to go to.
Comment #8
berdirSee https://www.drupal.org/docs/develop/local-server-setup/enable-verbose-er.... To be able to see where this is coming from you need to enable verbose logging and post the full output here (I recommend removing paths and domains that would allow to identify your project).
The current token release is used by 150k sites, I'm sure there are tens of thousands of D10 sites among those, something is special on your projects that triggers this.
Comment #9
ronraney commentedWell, as I stated, we use SQL Server. That's pretty special. Otherwise, it's a very vanilla setup.