4

I am getting this error in my console which is causing some other JS items not to work

    Uncaught TypeError: $(...).find(...).once is not a function
        at Object.attach (eval at globalEval (jquery.min.js?v=2.2.3:2), <anonymous>:156:44)
        at Object.Drupal.attachBehaviors (drupal.js?v=8.2.5:168)
        at insert (ajax.js?v=8.2.5:1084)
        at Drupal.AjaxCommands.loadEditorsAjax.commands.insert (quickedit.js?v=8.2.5:523)
        at Drupal.Ajax.success (ajax.js?ojj3xe:155)
        at Object.success (ajax.js?v=8.2.5:505)
        at i (jquery.min.js?v=2.2.3:2)
        at Object.fireWith [as resolveWith] (jquery.min.js?v=2.2.3:2)
        at z (jquery.min.js?v=2.2.3:4)
        at XMLHttpRequest.<anonymous> (jquery.min.js?v=2.2.3:4)

My current Drupal version 8.2.5 is using jquery 2.2.3 so I am not sure what is going on here.

Any ideas? I tried updating jquery to 3.0.0 but that didn't work. Same error.

6
  • The only js change from 8.2.4 to 8.2.5 was related to tests (drupal.org/node/2830485) so thats probably not your culprit. Are you sure that nothing else changed on your end?
    – bleen
    Jan 9, 2017 at 20:35
  • Are you using the bootstrap theme or a (custom) sub-theme thereof? If so, try excluding bootstrap.js. Jan 9, 2017 at 20:35
  • @WimMostrey I am using bootstrap and a subtheme of bootstrap. I did update bootstrap as well. I will try to disable bootstrap.js now
    – Ronnie
    Jan 9, 2017 at 20:39
  • 2
    .once() is not a jQuery core method. There is probably a plugin that creates the .once() method but jQuery core wouldn't be the issue. From your trace it appears to be an issue with an editor AJAX response.
    – Jasper
    Jan 9, 2017 at 21:37
  • 2
    Ok so we found the issue and it was none of the above or answer below. Google tag manager, that was recently added, was adding a second version of jQuery. The error must've been there since we added tag manager and just didn't notice @WimMostrey
    – Ronnie
    Jan 9, 2017 at 22:18

1 Answer 1

6

As suspected and confirmed this is an issue with the bootstrap theme. My advice would be to roll back to the previous working version and open a bug report in their issue queue on drupal.org.

1

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