Linked field not compatible with layout builder

Created on 4 July 2023, over 1 year ago
Updated 16 November 2023, about 1 year ago

Problem/Motivation

When I try to link an image field, and add it to the section of layout builder i get this error inside console

Chemin : /layout_builder/add/block/defaults/paragraph.lien_icone.default/1/links/field_block%3Aparagraph%3Alien_icone%3Afield_icone?_wrapper_format=drupal_dialog.off_canvas&ajax_form=1
StatusText: OK
ResponseText : TypeError: Illegal offset type in Drupal\Core\Entity\ContentEntityBase->get() (line 567 of /var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityBase.php)."

Also work without layout builder

Steps to reproduce

Add paragraph
Add field image
Add layout builder on paragraph view mod
add image field inside section
add linked field option
Click on add block

🐛 Bug report
Status

Active

Version

1.5

Component

Code

Created by

🇫🇷France musa.thomas France 🇫🇷

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

Comments & Activities

  • Issue created by @musa.thomas
  • 🇵🇹Portugal jrochate

    Same here. Have you found any workaround? Thanks.

  • 🇺🇸United States freelock Seattle

    We're hitting this too -- however, in our case, you can't actually set the link attribute to a field -- it only affected layouts with that already set. In our case, this was not saved on the node, but in the State field for layout builder.

    Deleting the layout override and avoiding the use of the setting to get the link from a different field allowed us to continue editing...

  • 🇮🇳India ravi kant Jaipur

    @Musa.thomas
    A possible solution may be to place an anchor tag on the image using styles.

Production build 0.71.5 2024