By scott_euser on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
12.x
Introduced in version:
Issue links:
Description:
drupalSettings.path.currentQuery, set by system_js_settings_alter(), is deprecated in drupal:12.0.0 and is removed from drupal:13.0.0. It has no cache context, so query string values could leak into cached pages.
Custom or contributed JavaScript that reads drupalSettings.path.currentQuery must read the current query from window.location instead.
Before:
const query = drupalSettings.path.currentQuery;
After:
const query = new URLSearchParams(window.location.search);
Impacts:
Module developers
Themers