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

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anybody created an issue. See original summary.

Anybody’s picture

Status: Active » Needs review

Anybody’s picture

Status: Needs review » Reviewed & tested by the community

RTBC'd by @thomas.frobieter

Anybody’s picture

Status: Reviewed & tested by the community » Fixed
Anybody’s picture

Can 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.

Anybody’s picture

Status: Fixed » Needs work

Back 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.

  • Anybody committed fbbb3d0d on 4.x
    Issue #3345294 by Anybody, thomas.frobieter: Image Paragraph lightbox...
Anybody’s picture

Status: Needs work » Fixed

Nice, 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.