Problem/Motivation
I noticed when using an online demo the following error in the console:
Uncaught TypeError: $(...).once is not a function
attach https://sandbox-carnation-ext-dev-php8.y.org/sites/default/files/js/js_oeUF0vWuqZ1LhDRxPDitaO-QXO2Ri7Y5UaHw9h-QGbM.js:12113
attachBehaviors https://sandbox-carnation-ext-dev-php8.y.org/sites/default/files/js/js_oeUF0vWuqZ1LhDRxPDitaO-QXO2Ri7Y5UaHw9h-QGbM.js:206
attachBehaviors https://sandbox-carnation-ext-dev-php8.y.org/sites/default/files/js/js_oeUF0vWuqZ1LhDRxPDitaO-QXO2Ri7Y5UaHw9h-QGbM.js:202
<anonymous> https://sandbox-carnation-ext-dev-php8.y.org/sites/default/files/js/js_oeUF0vWuqZ1LhDRxPDitaO-QXO2Ri7Y5UaHw9h-QGbM.js:728
listener https://sandbox-carnation-ext-dev-php8.y.org/sites/default/files/js/js_oeUF0vWuqZ1LhDRxPDitaO-QXO2Ri7Y5UaHw9h-QGbM.js:716
domReady https://sandbox-carnation-ext-dev-php8.y.org/sites/default/files/js/js_oeUF0vWuqZ1LhDRxPDitaO-QXO2Ri7Y5UaHw9h-QGbM.js:722
<anonymous> https://sandbox-carnation-ext-dev-php8.y.org/sites/default/files/js/js_oeUF0vWuqZ1LhDRxPDitaO-QXO2Ri7Y5UaHw9h-QGbM.js:727
<anonymous> https://sandbox-carnation-ext-dev-php8.y.org/sites/default/files/js/js_oeUF0vWuqZ1LhDRxPDitaO-QXO2Ri7Y5UaHw9h-QGbM.js:730
There's also another error with js-cookie missing on Drupal 10.1
Reference: https://www.drupal.org/node/3104677
Steps to reproduce
Proposed resolution
- Update the JS not to use jquery.once (it's gone in D10 IIRC) but rather
core.once. - Add
core.onceas a dependency.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3362496-missing_once_and_js_cookie_dependencies-7.patch | 2.41 KB | carolpettirossi |
Issue fork advanced_help_block-3362496
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
podarokcould you create MR with #2?
Comment #5
carolpettirossi commentedReference: https://www.drupal.org/node/3158256
It would be great if someone could review and provide feedback. =)
Attaching the patch to use in composer.json
Comment #6
carolpettirossi commentedComment #7
carolpettirossi commentedAttaching new patch with fix for the missing js-cookie
Comment #11
podaroktnx