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
Issue fork asymmetric_translations-3345709
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
paul dudink commentedComment #4
paul dudink commented