Problem/Motivation

The core security update introduced with Drupal core 10.5.5, 9.5.5 and 9.4.12 requires changing the logic in the wxt_library to match how the core language switcher was changed.

https://www.drupal.org/sa-core-2023-003

Steps to reproduce

Upgrade to latest security release of Drupal 9.4.12 or 9.5.5 or 10.0.5 Drupal core as follows:
for wxt 4.4.2:
composer require drupal/core:'9.4.12 as 9.4.11'
OR for wxt 4.5.0
composer require drupal/core:'9.5.5 as 9.5.4'
OR for wxt 5.0.x
composer require drupal/core:'10.0.5 as 10.0.4'

Doing so will break the language switcher, the other language link will not appear unless a logic change is made either to core or to wxt_library.

Proposed resolution

See patch for wxt_library

Remaining tasks

See patch

User interface changes

N/A

API changes

see patch

Data model changes

N/A

CommentFileSizeAuthor
#2 3349214-02.patch2.47 KBjoseph.olstad

Comments

joseph.olstad created an issue. See original summary.

joseph.olstad’s picture

see patch

as per suggestion by @alexpott.

Original code by @alexpott

I had to also modify line 145 of the same file , then it worked exactly as promised.

#3348592-41: [regression] Language switcher block throws exception when no route is matched

joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

Priority: Normal » Major

bumping this to a major since it blocks a core security advisory

joseph.olstad’s picture

Assigned: joseph.olstad » Unassigned
sylus’s picture

Status: Needs review » Fixed

Hey thanks so much for this @joseph and neat alexpott was helping too :D

Committed and attributed but I left the date handling to be addressed in the other issue.

Thanks again would have taken me a fair bit of time appreciate it greatly!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.