Page Twig suggestions based on path_alias fail on multilanguage pages

Created on 15 November 2024, 4 months ago

Problem/Motivation

https://git.drupalcode.org/project/radix/-/blob/6.0.x/includes/page.them...

What seems like a good idea at first sight, seems to be rather useless / error-prone on multilingual pages.

Steps to reproduce

Proposed resolution

IMO only the Entity-ID is a reliable override suggestion, maybe the default language path is another option, but the path could change at any time, so not very reliable.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Active

Version

6.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @thomas.frobieter
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States danchadwick Boston

    I agree. It seems like you could do this in a subtheme needed.

    @doxigo: your thoughts?

    Also, I cleaned up some leftover cruft (getting the node revision, but then not using the result).

  • Hey guys,

    Dan as I mentioned in the email:

    I believe this could be a breaking change and break every website that there is if itโ€™s in the core Radix. That aside the I canโ€™t recall on top of my head about the error that this causes in multilingual pages, and the issue but I know that Iโ€™ve used the path alias based suggestions quite a lot.

    If it were up to me, Iโ€™d try to fix it rather removing it, but feel free to make your own decision.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States danchadwick Boston

    This think the concern is/was that a translated path alias would be quite brittle. However, given that this has been in radix since v5, let's leave it alone to avoid a breaking change.

    @thomas.frobieter: Thanks for your suggestion. If we didn't have existing users, I'd would have removed the suggestion for path alias.

Production build 0.71.5 2024