Make base_route_name optional for Config Mappers

Created on 17 February 2016, over 9 years ago
Updated 9 June 2025, about 1 month ago

Problem/Motivation

Config translation requires that a base_route_name is provided for the config object being translated.
This is used to build up the UI paths for translating the object:
$this->getBaseRoute()->getPath() . '/translate/{langcode}/add',
However, it provides it's own UI for those paths, and doesn't actually use the route specified.

This means that for modules like Views or Page Manager that ship with their UI as an optional module, you cannot translate those entities without their UI modules installed.

Proposed resolution

When a base_route_name isn't provided, use a default path within the /admin/config/regional/config-translation section of the website.

Remaining tasks

Do it!

User interface changes

Config translation will be available even when optional UIs are turned off.

API changes

\Drupal\config_translation\ConfigMapperManager::processDefinition() will no longer throw an exception, which is neither documented nor explicitly tested.

Data model changes

N/A

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component

content_translation.module

Created by

🇺🇸United States tim.plunkett Philadelphia

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

    Worse Than Failure. Approximates the unpleasant remark made by Drupal developers when they first encounter a particular (mis)feature.

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