Entities using alias patterns with tokens of referenced entities are not updated.

Created on 26 April 2024, 2 months ago
Updated 13 May 2024, about 1 month ago

Problem/Motivation

When a pattern is configured using tokens related to entity reference fields or menu's, the alias is not updated if the referenced entity or menu is updated.

Steps to reproduce

Create a vocabulary (tags).
Create a content type (article) with a (taxonomy) entity reference field (example: field_tags).
Create a pathauto patterns for the content type using the reference field:
/articles/[node:field_tags:entity:parents]/[node:field_tags:entity:name]/[node:title]

Create a couple of tags terms "Term A", "Term B" at the vocabulary root.
Create some content "Some article" and assign it to 'Term B', it will get the url:
/articles/term-b/some-article

Now edit the term hierarchy and drag "Term B" under "Term A":

Term A
+- Term B

The url of "Some article" is not updated.

We expect "Some article" to have this url:
/articles/term-a/term-b/some-article

Proposed resolution

Check if there are pathauto patterns using field references to the entity whose alias is being updated and update those entities where the pattern can be applied too.

Remaining tasks

Provide a fix in PathautoGenerator::updateEntityAlias

User interface changes

none

API changes

none

Data model changes

none

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium kriboogh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024