Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
For image paragraphs Photoswipe library isn't attached and Photoswipe is not working, if no other part of the page uses it.
Steps to reproduce
Proposed resolution
Place an image paragraph and enable "Image can be zoomed (Lightbox Zoom)". Photoswipe library isn't attached and Photoswipe is not working, if no other part of the page uses it.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork drowl_paragraphs-3345294
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
AnybodyComment #6
AnybodyRTBC'd by @thomas.frobieter
Comment #7
AnybodyComment #8
AnybodyCan not fully work because of: #3345311: Uncaught TypeError: a is undefined still it's an improvement, so we'll leave it this way for now.
Comment #9
AnybodyBack to needs work. We'll try to call
\Drupal::service('photoswipe.assets_manager')->attach($attachments);
in a hook instead of adding the library in the template.In Photoswipe v5 that won't be needed anymore, presumably.
Comment #11
AnybodyNice, this works! With Photoswipe v5 we should be able then to switch back to the more simple implementation. I left a comment for that in code.