TypeError: once is not a function

Created on 12 June 2023, over 1 year ago
Updated 18 June 2023, over 1 year ago

Problem/Motivation

When on a project backlog page I get the following error...
TypeError: once is not a function

This prevents me from dragging tasks up or down and when I send the task to the board I get a post error.

Steps to reproduce

Add tasks to a project backlog and try to drag tasks or to post tasks
Visit the console in the code inspector and see the error message

/**
 * @file
 * Contains burndown.backlog.js.
 */
(function ($, Drupal, drupalSettings) {
  Drupal.behaviors.burndownBacklog = {
    attach: function (context, settings) {
      // Only do setup once.
      $('body').once('setupBacklog').each(function () {
        // Update sprint data on load.
        updateSprints();

        // We debounce the postback that saves the new sort
        // order, since users can change the order several
        // times in a row before getting it the way they want
        // it (and we only really need the final ordering).
        var reorder = debounce(function() {
          postSortOrder();
        }, 2000);

Line:9 burndown.backlog.js

$('body').once('setupBacklog').each(function () {
TypeError: once is not a function

TypeError: $(...).once is not a function
attac /modules/contrib/burndown/js/burndown.backlog.js?v=10.0.7:9
Drupal.attachBehaviors/</core/misc/drupal.js?v=10.0.7:166
forEachself-hosted:203
Drupal.attachBehaviors/core/misc/drupal.js?v=10.0.7:162
<anonymous>/core/misc/drupal.init.js?v=10.0.7:32
listener/core/misc/drupal.init.js?v=10.0.7:20
domReady/core/misc/drupal.init.js?v=10.0.7:26
<anonymous>/core/misc/drupal.init.js?v=10.0.7:31
<anonymous>/core/misc/drupal.init.js?v=10.0.7:34

My Setup

Drupal Version
10.0.7
PHP Version
8.1.18
Database Version
5.7.36
Web Server
Apache/2.4.51 (Win64)

🐛 Bug report
Status

Fixed

Version

1.0

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