token.entity_mapper error if Token module not present.

Created on 20 April 2022, almost 3 years ago
Updated 29 January 2023, about 2 years ago

Error:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "token.entity_mapper". in Drupal\Component\DependencyInjection\Container->get() (line 156 of /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php).

Seems to be the same bug as this:
https://www.drupal.org/project/address/issues/2980217

    $token_type = \Drupal::service('token.entity_mapper')->getTokenTypeForEntityType($entity_type_id);
    if (empty($token_type)) {
      continue;
    }

This code in `country_token_info` should check that the service is present first. Or Token should be defined as a dependency.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom nicholasthompson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024