- Issue created by @veronicaSeveryn
- πΊπΈUnited States veronicaSeveryn
Never mind.
After more testing, found that contrib theme was using outdated jQuery version (3.5.0) which was causing the error in the end.Closing
While on Drupal 10.5.1 the pager works fine, without any AJAX errors. After update to Drupal 10.5.2 manually clicking the pager (haven't tested with automated option, but I think it will be the same), the pager's code causes AJAX error.
Looks like the breaking change is in ajax.js file (around lines 1335+):
from
// Parse response.data into an element collection.
const parseHTML = (htmlString) => {
const fragment = document.createDocumentFragment();
// Create a temporary div element
const tempDiv = fragment.appendChild(document.createElement('div'));
// Set the innerHTML of the div to the provided HTML string
tempDiv.innerHTML = htmlString;
// Return the contents of the temporary div
return tempDiv.childNodes;
};
to this:
// Parse response.data into an element collection.
const parseHTML = (htmlString) => {
const fragment = document.createDocumentFragment();
// Create a temporary template element.
const template = fragment.appendChild(
document.createElement('template'),
);
// Set the innerHTML of the template to the provided HTML string.
template.innerHTML = htmlString;
// Return the contents of the temporary template.
return template.content.childNodes;
};
Active
2.0
Code
Never mind.
After more testing, found that contrib theme was using outdated jQuery version (3.5.0) which was causing the error in the end.
Closing