Problem/Motivation

Core Configuration Translation fails with following error: InvalidArgumentException: Link templates accepts paths, which have to start with a leading slash. in Drupal\Core\Entity\EntityType->setLinkTemplate()

Proposed resolution

Update annotation (see #5) or implement hook_entity_type_build

Remaining tasks

User interface changes

API changes

Original report by @dmitrii

CommentFileSizeAuthor
#5 2424441-5.patch2.18 KBdmitrii
#3 2424441-2.patch1.59 KBdmitrii
#1 2424441-1.patch1.57 KBdmitrii

Comments

dmitrii’s picture

Status: Active » Needs review
StatusFileSize
new1.57 KB

Status: Needs review » Needs work

The last submitted patch, 1: 2424441-1.patch, failed testing.

dmitrii’s picture

StatusFileSize
new1.59 KB
berdir’s picture

Issue summary: View changes
Status: Needs work » Postponed (maintainer needs more info)

I don't understand what this is supposed to achieve, I added the issue summary template, please fill it out. All those values are set as part of the annotation, there is no reason to duplicate it?

dmitrii’s picture

StatusFileSize
new2.18 KB

Proposed annotation change.

dmitrii’s picture

Issue summary: View changes
dmitrii’s picture

Status: Postponed (maintainer needs more info) » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: 2424441-5.patch, failed testing.

The last submitted patch, 3: 2424441-2.patch, failed testing.

berdir’s picture

Title: Implement hook_entity_type_build for the Configuration Translation module » Update entity link templates to use links instead of route names
Status: Needs work » Needs review

Ah, now I get what you are trying to do. Updating issue title. No idea how that's still working in HEAD?

The test fail is unrelated, and fixed in #2425921: CommentManager::addDefaultField() moved to CommentTestTrait (and other test fixes).

berdir’s picture

Status: Needs review » Reviewed & tested by the community
drunken monkey’s picture

Status: Reviewed & tested by the community » Active
Issue tags: +Needs tests

No idea how that's still working in HEAD?

Apparently, we're currently not testing that. Although I'm surprised myself that, e.g., the integration test doesn't ever use this …
Adding the "Needs tests" tag.

Anyways, thanks a lot for the patch, seems to work great! Committed.

For others' reference, the Core issue that introduced the change is this one: #2281645: Make entity annotations use link templates instead of route names.

drunken monkey’s picture

Title: Update entity link templates to use links instead of route names » Test entity link templates
Component: Framework » Tests
Issue tags: -Needs tests +release target