Scenario:
After upgrading to drupal 8.5 and higher the blazy photoswipe plugin generates an error when opening the image to the photoswipe lightbox
Error message:
TypeError: cannot use 'in' operator to search for 'container' in 'drupalSettings.photoswipe'.
Code in blazy.photoswipe.min.js:
Drupal.behaviors.blazyPhotoSwipe = {
attach: function (context) {
var pswpElm = document.querySelector('.pswp');
// If body has no container for PhotoSwipe gallery, append it.
if ('container' in drupalSettings.photoswipe && pswpElm === null) {
// https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML
document.body.insertAdjacentHTML('beforeend', drupalSettings.photoswipe.container);
}
Closed: duplicate
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.