The language entity is missing a uri() method implementation and therefore poses as having a generic /entity/* URL for the entity, which is not at all the case. Other config entities provide the uri() for the backend editing form for the entity, such as Block, View, etc. Config translation module uses this to add the additional Translate operation to listings for the entities. The lack of uri() implementation on Language entities makes the Translate operation go to the generic /entity/* URL which will obviously not work.


Implement the uri() method exactly like Block.

Marking as a blocker for #2044389: [META] Fix broken configuration translation pages which is a blocker for #1952394: Add configuration translation user interface module in core.

Members fund testing for the Drupal project. Drupal Association Learn more


YesCT’s picture

Here is the one for Blocks

   * Overrides \Drupal\Core\Entity\Entity::uri();
  public function uri() {
    return array(
      'path' => 'admin/structure/block/manage/' . $this->id(),
      'options' => array(
        'entity_type' => $this->entityType,
        'entity' => $this,

I looked at the patch and it does the same thing. Good.

I tried the path + 'path' => 'admin/config/regional/language/edit/' . $this->id(), before and after and it works.

There are tests in core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationUiTest.php that use admin/config/regional/language/edit/en
so there is test coverage already that we are not breaking the edit.

I can verify that without the patch, but with config_translation module, that the translate link goes to
and of course that page is "Page not found"

With the patch applied,
The translate link is correct: admin/config/regional/language/edit/en/translate

I've got the screenshots to prove it. *wink*

before patch


after patch

the edit link is still the same.

without patch with config_translation



with patch with config_translation


Looks really good. RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 186312d and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Gábor Hojtsy’s picture

Issue tags: -sprint

Removing sprint tag.