$this->photoswipeAssetManager->attach() conflicts with twig_field_value "|field_value"

Created on 10 October 2023, almost 2 years ago

Problem/Motivation

$this->photoswipeAssetManager->attach() conflicts with twig_field_value |field_value filter for field formatters.

Steps to reproduce

Instead of rendering the whole field regularly, use {{ content.field_image|field_value }}
See the library is not being attached

Proposed resolution

In https://git.drupalcode.org/project/photoswipe/-/blob/5.x/src/Plugin/Fiel... attach the library to each item instead of the field.

While that may lead to duplication, it also works if the field is handled like this.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

Production build 0.71.5 2024