The main module adds alternate links to the head, but doesn't take the published state into account

Created on 3 March 2023, over 1 year ago

Problem/Motivation

In asymmetric_translations_page_attachments_alter() href links are added to the page head pointing to node translations. However, this functionality does not take into account whether or not content is published, leading to inaccessible URL's.

Steps to reproduce

  • Create a node in one language, for example NL
  • Create / add an asymmetric node translation in another language, for example EN
  • Unpublish the EN node
  • On the URL of the NL node the href lang meta tag now points to the EN node, but this URL is inaccessible because it is unpublished

Proposed resolution

One solution could be to only add published nodes to the head.

The fact that an unpublished node triggers a 403, raises the question whether any inaccessible content should be referenced in the href lang meta-tags.

For now we'll just check on publish state though.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.69.0 2024