- Issue created by @jorgik
- Merge request !21Issue #3516442: Add jQuery and dependency verification checks to EU Cookie... → (Open) created by jorgik
JavaScript behaviours in EU Cookie Compliance Rocketship fail in certain contexts like Layout Builder because it doesn't verify the availability of required dependencies (jQuery, once) before execution. This results in errors like Uncaught TypeError: jQuery is not a function or once is not defined.
Install EU Cookie Compliance Rocketship module and Section library for example (
https://www.drupal.org/project/section_library →
)
Navigate to Layout Builder interface (/node/{node_id}/layout)
Save current section in a section library
Open browser console
Observe dependency-related errors
Add dependency verification checks at the start of behavior attachment
Add dependency checks to all EU Cookie Compliance JavaScript behaviors
Test in various contexts (Layout Builder, AJAX, etc.)
Update documentation
No UI changes required. This is a JavaScript stability improvement.
No API changes required. This is a JavaScript stability improvement.
Active
2.1
Code