Refactor asset aggregation to avoid using deprecated asset optimization classes

Created on 14 November 2023, 8 months ago
Updated 9 February 2024, 5 months ago

Problem/Motivation

H5P was relying on an implementation detail of core's JavaScript and CSS aggregation - that it would write out files when generating a URL. This no longer happens when the URL is generated but in a system module asset controller.

In πŸ› Drupal 10 compatibility JS aggregation causes js error with aggregation enabled RTBC services using the old, deprecated classes from Drupal 9/10.0 were added to maintain the same as the current behaviour. Instead, the logic should be changed either generate the URL and use the route if possible, or if not to copy some logic from the controller to write it out instead.

In general I wonder if instead of 'faking' libraries, whether dynamic libraries could be created instead, and then the whole logic could use #attached instead of re-implementing parts of Drupal's asset handling.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom catch

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

Comments & Activities

Production build 0.69.0 2024