Remove call to deprecated jQuery.once

Created on 12 October 2023, 9 months ago
Updated 13 October 2023, 9 months ago

Problem/Motivation

In Drupal 9.3 the jQuery.once was deprecated; it's not part of Drupal 10. Drupal 10 sites won't have their views lazy loaded, as the module's ajax.js file still attaches lazy ajax using jQuery.once.

Steps to reproduce

Implement lazy views in a Drupal 10 site and observe the following error in your js console:
drupal.js?v=10.1.5:64 Uncaught TypeError: $(...).once is not a function

Proposed resolution

Remove the module's dependency on jQuery.once and update ajax.js to use Drupal's own once library's syntax.

Remaining tasks

Patch forthcoming.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States COBadger

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

Comments & Activities

Production build 0.69.0 2024