javascript problems in BEF after upgrading to Drupal 10

Created on 21 June 2023, over 1 year ago
Updated 24 April 2024, 8 months ago

Problem/Motivation

I am in the midst of upgrading a site to Drupal 10. Unfortunately, the upgrade has left me with several problems, mainly focused on BEF. These may very well be related to javascript problems outside of BEF-proper, but hoped someone here might have insight.

The problem is twofold. After upgrading to Drupal 10, the javascript that I use to handle the UX for interacting with the BEF filters isn't working. When I load a page with BEF filters on it, the js console shows these errors:

TypeError: e("body",t).once is not a function. (In 'e("body",t).once("setupBreakpoints")', 'e("body",t).once' is undefined)
TypeError: e(".paragraph--type--single-image-promo").once is not a function. (In 'e(".paragraph--type--single-image-promo").once()', 'e(".paragraph--type--single-image-promo").once' is undefined)
TypeError: e(".photo-gallery .swiper-container").once is not a function. (In 'e(".photo-gallery .swiper-container").once("photo-gallery")', 'e(".photo-gallery .swiper-container").once' is undefined)
TypeError: n.once is not a function. (In 'n.once("wrapped")', 'n.once' is undefined)

This makes me think the issue may have to do with the removal of drupal/jquery.once.

However, there's also a second problem. If I try to interact with my filters to draw a set of results, in the JS error console I see a huge error dump that starts like so:

AjaxError: 
An AJAX HTTP error occurred.
HTTP Result Code: 400
Debugging information follows.
Path: /views/ajax
StatusText: error
ResponseText: 
(window.NREUM||(NREUM={})).init={ajax:{deny_list:["bam.nr-data.net"]}};(window.NREUM||(NREUM={})).loader_config={licenseKey:"15f63e1d4c",applicationID:"1480921473"};;(()=>{"use strict";var e,t,n={8768:(e,t,n)=>{n.d(t,{T:()=>r,p:()=>i});const r=/(iPad|iPhone|iPod)/g.test(navigator.userAgent),i=r&&Boolean("undefined"==typeof SharedWorker)},880:(e,t,n)=>{n.d(t,{P_:()=>f,Mt:()=>p,C5:()=>s,DL:()=>m,OP:()=>_,lF:()=>E,Yu:()=>y,Dg:()=>g,CX:()=>c,GE:()=>b,sU:()=>j});var r=n(6797),i=n(4286);const o={beacon:r.ce.beacon,errorBeacon:r.ce.errorBeacon,licenseKey:void 0,applicationID:void 0,sa:void 0,queueTime:void 0,applicationTime:void 0,ttGuid:void 0,user:void 0,account:void 0,product:void 0,extra:void 0,jsAttributes:{},userAttributes:void 0,atts:void 0,transactionName:void 0,tNamePlain:void 0},a={};functio

I can see that I'm raising a 400 error, but why this is is a mystery to me. If I revert my code back to Drupal 9.5.9, the same BEF interface works perfectly.

I'm happy to provide any more details necessary. I hope this is sufficient to describe the problem.

Thanks.

πŸ› Bug report
Status

Fixed

Version

6.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mefron

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024