Problem
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.
Proposal
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | before-language-edit.png | 307.26 KB | YesCT |
#1 | after-patch-language-edit.png | 288.71 KB | YesCT |
#1 | with-config-translate-edit.png | 302.54 KB | YesCT |
#1 | with-config-translate-translate-link.png | 75.03 KB | YesCT |
#1 | with-patch-with-config-translation-translate-link.png | 81.2 KB | YesCT |
Comments
Comment #1
YesCT CreditAttribution: YesCT commentedHere is the one for Blocks
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
entity/language_entity/en/translate
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.
Comment #2
alexpottCommitted 186312d and pushed to 8.x. Thanks!
Comment #4
Gábor HojtsyRemoving sprint tag.