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

ronraney created an issue. See original summary.

ronraney’s picture

Issue summary: View changes
jsimonis’s picture

Also having the same issue.

berdir’s picture

Status: Active » Postponed (maintainer needs more info)

Backtrace? Did you visit update.php?

It works for others and tests are also ok, so something is special about your site.

ronraney’s picture

I didn't capture a backtrace. I was unable to update database. You can close this if you think it's irrelevant.

berdir’s picture

I'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.

jsimonis’s picture

I also couldn't get to update.php. All I got was the error regardless of what page I tried to go to.

berdir’s picture

See 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.

ronraney’s picture

Well, as I stated, we use SQL Server. That's pretty special. Otherwise, it's a very vanilla setup.