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
Comments
Comment #2
joseph.olstadsee 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
Comment #3
joseph.olstadComment #4
joseph.olstadbumping this to a major since it blocks a core security advisory
Comment #5
joseph.olstadComment #6
sylus commentedHey 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!