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

Created on 14 January 2025, 8 days ago

Problem/Motivation

I'm using Snipper_manager v3.0.0. in my project and getting error on css and js forms at console as below

Uncaught TypeError: $(...).once is not a function
at Object.attach (editor.js?sq2og1:14:10)
at drupal.js?v=10.3.9:166:24
at Array.forEach ()
at Drupal.attachBehaviors (drupal.js?v=10.3.9:162:34)
at big_pipe.js?v=10.3.9:153:10
at big_pipe.js?v=10.3.9:184:3

Uncaught TypeError: $(...).once is not a function
at Object.attach (editor.js?sq2og1:14:10)
at drupal.js?v=10.3.9:166:24
at Array.forEach ()
at Drupal.attachBehaviors (drupal.js?v=10.3.9:162:34)
at HTMLAnchorElement. (ajax.js?v=10.3.9:1397:18)
at Function.each (jquery.min.js?v=3.7.1:2:3129)
at ce.fn.init.each (jquery.min.js?v=3.7.1:2:1594)
at Drupal.AjaxCommands.insert (ajax.js?v=10.3.9:1389:19)
at ajax.js?v=10.3.9:1054:41

Steps to reproduce

visit '/admin/structure/snippet//edit/css or '/admin/structure/snippet//edit/js' page
check console.

Proposed resolution

In module 'core/jquery.once' used as dependencies in libraries.yml file, use 'core/once' instead.
update the js code in editor.js accordingly.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇮🇳India chetananemade

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

Comments & Activities

Production build 0.71.5 2024