Closed (duplicate)
Project:
Linked Field
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2014 at 13:50 UTC
Updated:
30 May 2023 at 14:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
yannickooWe should create an array for that instead of having 1k if's, something like a blacklist.
Comment #2
archnode commentedHow about this? Using a simple array to map certain elements to a handler. We could make the array alterable or event implement kind of a linked_field_handler_info(), but I'm not sure if that is necessary, what do you think?
Comment #3
yannickooYeah something like this :) A small drupal_alter would be enough I think.. I will work on this later, thanks for the patch.
Comment #5
yannickooComment #6
jon@s commentedHas this been ported into the D8 version yet?
Comment #7
pixelmord commentedIn the D8 version there is an additional problem that the the render array of the filed is replaced completely.
See attached patch that addresses both problems, but beware: I did only test this with responsive image fields so far.
Comment #8
m.abdulqader commentedThe last patch worked well, but when you edit the content the picture markup will break. Remove cache it will work.
Thanks
Comment #9
abu-zakham commentedI have re-rolled the patch in #7 to work with the latest development version.
Comment #10
abu-zakham commentedComment #12
weseze commentedHad a similar issue with the use of the drimage module. It generates inline svg data in the src attributes for images. And when a destination is set via linked_field on these images, linked_field changes the inline svg data. Some characters are html encoded, making the inline svg data not work anymore.
Your patch in #9 fixed the problem.
Comment #13
mariacha1 commentedPatch #9 was breaking when we had caching enabled, since media entities are cached. I'm including a small change to set the value of the ['#markup'] to a proper Markup class. It's possible this is only a problem with Media Entity media items, and not Core media items.
Comment #14
sonfdPatch #13 is working for me with contrib media entity items.
Comment #15
johnlutz#13 works with media
Comment #16
qsDave commentedJust tried this module and it prevented the gears from working in the manage displays page. Uninstalling the module, brought them back. This is using D 8.5.3 and the 8.x-1.1 version of this module.
Comment #17
calebyoder commentedWas having issues getting Blazy, responsive images, and linked field working together. I applied patch #13 and it seems to be working so far.
Thanks!
Comment #18
PaulDinelle commentedIn case anyone is interested, I've created a generic fix for this issue (and similar elements). It allows you to specify which elements you want to wrap with an anchor and prevents recursion on those chosen elements, which is mostly what the patch here does but without the configuration options.
We needed this for the FontAwesome field module, but I see it could be useful here as well.
https://www.drupal.org/project/linked_field/issues/3088623
Comment #19
edwardchiapetWe were having issues where images were duplicated with the Image Lazyloader module, and patch #13 seems to have resolved that for us!
Comment #20
JFKiwadThe patch (#13) still works (Tested on Drupal v9.2.8)
Comment #21
mighty_webber#13 did NOT work for me. (9.4). This patch works on the front end, but does not pre-populate layout builders with the previously selected/saved value.
Comment #22
heddnThis issue, while older, is behind the work over in #3197132: Linking breaks responsive image formats. Closing duplicate to it.