Remove dependency on jQuery once

Created on 11 May 2023, over 1 year ago

Problem/Motivation

The main module and the submodule log_entity_operations_entity are using the deprecated dependency on jQuery once.

When using Drupal 10 and viewing the settings under /admin/config/development/log-entity-operations or listing the logs under /admin/config/development/log-entity-operations/logs following error appears in the JavaScript console:

caught TypeError: $(...).once is not a function

Steps to reproduce

Main module:

  1. Enable the module log_entity_operations.
  2. Open the module settings under /admin/config/development/log-entity-operations.

Submodule log_entity_operations_entity:

  1. Enable the module log_entity_operations and its submodule log_entity_operations_entity.
  2. Under /admin/config/development/log-entity-operations enable «Show Diff collapsable» and enable any of the entities to be logged.
  3. Make a change on an entity which was enabled to be logged.
  4. Open the entity logs under /admin/config/development/log-entity-operations/logs.

Proposed resolution

Use the once package that comes from the Drupal core instead of using the jQuery once.

See following change record for more information about this issue: Remove jQuery dependency from the once feature

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇭Switzerland audacus

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

Comments & Activities

Production build 0.71.5 2024