Problem/Motivation

When using entity browser form trait with an image that is on a subform of a parent form, the image is not able to be selected correctly within the processEntityBrowserSelected function. This is due to the parent array not encapsulating the entire path through subforms.

Steps to reproduce

Add a form with an entity browser form trait as a sub-form to the parent form. When selecting an image, it will go through with the selected image but the entity will not be found.

Proposed resolution

Change the parent array to not use magic numbers and instead use the correct pathing.

Remaining tasks

Review patch

CommentFileSizeAuthor
#2 3251968_work_with_children.patch844 bytesctlopez

Comments

ctlopez created an issue. See original summary.

ctlopez’s picture

StatusFileSize
new844 bytes

Adding patch

dave reid’s picture

Version: 8.x-1.11 » 8.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

Tested and confirmed it works. Thanks!

  • ctlopez authored d1b1d09 on 8.x-1.x
    Issue #3251968 by ctlopez: Fixed EntityBrowserFormTrait::...
dave reid’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x-1.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.