The 'system.css_js_query_string' state is deprecated in drupal:10.2.0

Created on 16 September 2025, 16 days ago

Problem/Motivation

In Drupal 11, the JS assets used by H5P try to add a cache busting URL parameter, but the deprecated method always returns a '0', which results in URL paths like /modules/contrib/h5p/vendor/h5p/h5p-core/js/h5p-event-dispatcher.js?0=. Since the cache bust param is always the same, it won't actually bust the cache.

Steps to reproduce

  • Open your browsers developer tools window
  • Visit the network tab
  • View any node with an H5P field.
  • In the dev tools network tab, you will see all the H5P JS / CSS files have the ?0= parameter appended.

Proposed resolution

Replace all uses of Drupal::state()->get('system.css_js_query_string', '0') with calls to \Drupal::service('asset.query_string')->get()

Remaining tasks

Update the following lines:

  • src/Form/H5PContentUpgradeForm.php - line 66
  • src/H5PDrupal/H5PDrupal.php - line 139
  • src/H5PDrupal/H5PDrupal.php - line 174
  • modules/h5peditor/src/H5PEditor/H5PEditorUtilities.php - line 122

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States illeace

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024