"Undefined Array key" when used with custom permissions + inline entity form

Created on 9 January 2025, 21 days ago

Problem/Motivation

When using an iFrame field in a content type that uses (complex) inline entity forms (ie paragraphs), and the iFrame field has custom permissions, users that dont have editing permissions for the field are unable to save the node. Instead, an error is thrown ("Warning: Undefined array key")

Steps to reproduce

1. Add iFrame field to a node that uses paragraphs with form display config of the paragraph field set to inline entity form (complex)
2. In iframe field settings, set custom permissions: Admin gets all permissions; Editor (and all other roles) only get "view anyones value for field", for the front end.
3. edit a node as Editor (the iFrame will not be visible as configured in 2.), and edit the paragraph inline entity form (just click on "edit", no actual editing is required)
4. click on "Save"
5. Regardless of wether or not the (hidden) iFrame field has a value, the node will not be saved, instead an error will be thrown: Warning: Undefined array key
6. If the complex inline entity field of the node is not edited, the problem does not occur.

Proposed resolution

I do not have a proposed solution; I need the field to be hidden for some user roles, but not for others

🐛 Bug report
Status

Active

Version

2.24

Component

Miscellaneous

Created by

🇩🇪Germany thoffmann

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

Comments & Activities

Production build 0.71.5 2024