This is a follow-up issue to 🐛 Only file JavaScript assets with preprocessing enabled can be optimized. Active .
All submodules use hook_js_alter() to conditionally modify JavaScript files when "knock out" is enabled. These modifications include
preprocess to FALSEtype="text/plain" and data-cookieconsent to prevent script execution until consent is givenThe problem is that these conditional modifications in hook_js_alter() are not compatible with how JavaScript aggregation caching works in Drupal. Even though aggregation changed significantly in Drupal 10.1, the caching of hook_js_alter() did not change. This means:
This is the same pattern that core modules like locale and ckeditor5 solved by using placeholder libraries that are conditionally attached, ensuring unique aggregate URLs based on whether the library is present or not.
Refactor the cookies submodules to use a placeholder library, following the same approach used by core modules locale and ckeditor5:
This approach ensures that:
Active
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.