Config translation module cannot deal with different base path

Created on 17 October 2014, over 10 years ago
Updated 18 April 2025, 9 days ago

Over on #2351991-85: Add a config entity for a configurable, topic-based help system β†’ , I tried to make the new help topic config entity use the "canonical" path as the base path for config translation.

I thought all I would need to do is:

function help_config_translation_info_alter(&$info) {
  $info['help_topic']['base_route_name'] = 'entity.help_topic.canonical';
}

However, this doesn't work, because the config translation module has a bunch of other spots where it is assuming that the base route is the edit form page, not the canonical page for the entity.

This assumption seems wrong. If the config translation module is going to have a hook to provide the base route, it should be getting that information from the hook/alter always.

Things not currently working right (that have this assumption):

  1. The edit links on the config translation overview page for a particular entity object go to the base route. They should be going to the edit page specifically.
  2. config_translation_entity_type_alter():
    if ($entity_type->hasLinkTemplate('edit-form')) {
            $entity_type->setLinkTemplate('drupal:config-translation-overview', 'config_translation.item.overview.' . $entity_type->getLinkTemplate('edit-form'));
          }
    

    this needs to be using the base route name set up in the hook/alter, not assuming it's the edit form.

  3. Maybe others?
πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component

config_translation.module

Created by

πŸ‡ΊπŸ‡ΈUnited States jhodgdon Spokane, WA, USA

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

Sign in to follow issues

Merge Requests

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