Problem/Motivation

The field is located in options[settings][photoswipe_reference_image_field], so its not the third party settings bug, like we have it in #3523410: Missing Photoswipe Views caption: Drupal core's third party settings formatter missing from Views UI.
Steps to reproduce
1. Set up a view with field output
2. Add a media (image) reference field
3. Configure the Photoswipe or Photoswipe Responsive formatter
=> Find the empty photoswipe_reference_image_field select
Technically the "Field formatter with inline settings" field selection from https://www.drupal.org/project/field_formatter/ is similar in its functionality.
This bug only exists in the views formatter, while the formatter in the entity display works fine!
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| firefox_FIUTzsMg2G.png | 63.38 KB | thomas.frobieter |
Issue fork photoswipe-3576722
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
anybodyMhm, this MIGHT be hard, because we don't know what the referenced entity is. The most simple fix might be to list all image fields maybe?
But doesn't feel really good. Maybe other modules already solved this? Or any better ideas? Maybe first compare it to the other formatters?
EDIT: Aren't we already USING the field here (selected in the step before?) I mean we're configuring the image field formatter, why ask for another field? Maybe this is *just* a silly bug?
Comment #3
thomas.frobieterNo, this is not a bug; it's the regular PSWP Media/Entity Reference formatter, 1:1. It's the formatter for the media reference field. The field you select is the file field (so, by default, field_media_image).
Comment #4
anybodyAdded the following to the issue summary:
Technically the "Field formatter with inline settings" field selection from https://www.drupal.org/project/field_formatter/ is similar in its functionality.
This bug only exists in the views formatter, while the formatter in the entity display works fine!
Comment #5
anybodyOkay I think the reason might be that
returns NULL in the view.
Comment #6
anybodyEven more interesting: In Views
is a
Drupal\Core\Field\BaseFieldDefinitionand does NOT contain any target_bundles
while the same code is
Drupal\field\Entity\FieldConfigin the field display form!
Comment #7
anybodyLuckily I found the missing pieces here: https://git.drupalcode.org/project/field_formatter/-/blob/3.x/src/Plugin...
Works as expected now. Views need special treatment! :)
Comment #9
anybody@thomas.frobieter please review via tugboat
Comment #10
thomas.frobieterWorks perfectly fine now! thx!
Comment #11
thomas.frobieter