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

  1. Update the JS not to use jquery.once (it's gone in D10 IIRC) but rather core.once.
  2. Add core.once as a dependency.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon 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

AndyF created an issue. See original summary.

podarok’s picture

Status: Active » Postponed (maintainer needs more info)

could you create MR with #2?

carolpettirossi made their first commit to this issue’s fork.

carolpettirossi’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.26 KB

Reference: 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

carolpettirossi’s picture

Title: Missing dependency on once » Missing dependency on once and js-cookie
Issue summary: View changes
carolpettirossi’s picture

StatusFileSize
new2.41 KB

Attaching new patch with fix for the missing js-cookie

podarok’s picture

Version: 1.0.x-dev » 1.0.5
Status: Needs review » Fixed

tnx

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.