Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291721

[regression] Inaccessible language switcher links are removed before alternatives can be provided

$
0
0

Problem/Motivation

After upgrading to 9.4.12 to apply the 3/15 security patch SA-CORE-2023-003, the Language switcher block only shows links to accessible translations of pages. Many sites would like to show links for all languages - linking to the translations of the current page where that is accessible, or something else, such as the home page for languages that do not have an accessible translation of the current page.

Steps to reproduce

  1. Steps to reproduce
  2. Install all of the core Multilingual modules
  3. Add another language
  4. Enable a content type for content translation (including its published field)
  5. Use URL -> Path for the language detection
  6. Place the Language switcher content block
  7. Add a piece of content in one language
  8. Add a translation of that content in the other language, ensuring to mark it as unpublished
  9. Log out (so that the user cannot access the unpublished translation)
  10. View the content. Language switcher block is shown.
  11. View the content in the other language. Language switcher block does not show any link for the other language.

Proposed resolution

Move the filtering of links for access to them, to after hook_language_switch_links_alter() has run.

Remaining tasks

Provide patch, with tests.

User interface changes

None, aside for sites that have implementations of hook_language_switch_links_alter() that operate on links that have been removed since SA-CORE-2023-003, which could see links restored.

API changes

Restores API possibilities from before SA-CORE-2023-003, whilst allowing for that fix to still be imposed.

Data model changes

None

Release notes snippet


Viewing all articles
Browse latest Browse all 291721

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>