1

jquery.once is perfectly working, I placed console.log inside it, but I still get this error especially when I load the Views UI without even before I press any button

When I press any button, a progress animation appears and again this error appears

views-admin.js?op2hqg:164 Uncaught TypeError: $form.once is not a function
    at Object.Drupal.behaviors.addItemForm.attach (views-admin.js?op2hqg:164)

When I investigates I found that the following jquery select returns 0 objects

var $form = $(context).find('form[id^="views-ui-add-item-form"]').first();

How to solve this, should I disable any modules?

1

This might happen when you use jQuery Update, I faced the same and solved using CDN providers

Use jQuery CDN Provider in your jQuery Update Settings should solve this issue

Load your settings as yoursite.com/admin/config/development/jquery_update, You will see the option jQuery and jQuery UI CDN with None in the dropdown list.

Choose jQuery and Save Configuration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.