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

Created on 8 August 2023, 11 months ago
Updated 20 September 2023, 9 months 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.69.0 2024