Closed (fixed)
Project:
PhotoSwipe - Responsive JavaScript Modal Image Gallery
Version:
5.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Sep 2024 at 09:06 UTC
Updated:
21 May 2025 at 13:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
anybodyThanks for the feedback @cristianalcaraz. Looks like the issue is here:
https://git.drupalcode.org/project/photoswipe/-/blob/5.x/modules/photosw...
Seems the entity needs to be loaded in the current language if translated (from context): https://www.drupal.org/docs/drupal-apis/entity-api/entity-translation-api
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
Comment #3
anybodyI think this is the best resource for the correct implementation: https://drupal.stackexchange.com/questions/180660/get-translated-field-v...
@cristianalcaraz would you like to give it a try?
Comment #4
cristianalcaraz commentedThank for your tips @anybody :)
I will try it!
Comment #5
bgreco commentedThis patch fixes the issue when rendering a Media field. Not sure if it's still an issue when rendering an Image field.
Comment #6
anybody@bgreco please use a MR, not patches. Thanks!
Comment #9
grevil commentedThe fix provided will work for both media and file.
Comment #10
anybodyPerfect, thanks @grevil! :)
Comment #11
anybodyComment #13
grevil commentedThanks all!