token.entity_mapper error if Token module not present.

Created on 20 April 2022, about 2 years ago
Updated 29 January 2023, over 1 year 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.69.0 2024