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

Created on 8 August 2023, over 1 year ago
Updated 20 September 2023, about 1 year ago

Problem/Motivation

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

in /expense_tracker/js/reports.admin.js

once is not defined.

Steps to reproduce

Visit /admin/expense-tracker/income-reports and try to generate a report.

Proposed resolution

(function($, Drupal, drupalSettings) {
  Drupal.behaviors.testimonials = {
    attach: function(context, settings) {
      $(document, context).once('testimonials').each(function(element) {

to something like this... but I am having no success.

(function($, Drupal, drupalSettings, once) {
  Drupal.behaviors.testimonials = {
    attach: function(context, settings) {
      $(once('testimonials', 'document', context)).each(function(element)	  {
๐Ÿ› Bug report
Status

Needs review

Version

1.3

Component

Code

Created by

๐Ÿ‡ฟ๐Ÿ‡ฆSouth Africa vlooi vlerke

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

Comments & Activities

Production build 0.71.5 2024