Problem/Motivation

When you upload an image with the InlineEntityFormMediaWidget, it would be nice if all the mapped fields of the media entity would be already populated.

Proposed resolution

Call Media::prepareSave in submitEdit.

CommentFileSizeAuthor
#5 3188665-5.patch974 byteschr.fritsch
#2 3188665.patch905 byteschr.fritsch

Comments

chr.fritsch created an issue. See original summary.

chr.fritsch’s picture

StatusFileSize
new905 bytes

Here is a patch

chr.fritsch’s picture

Status: Active » Needs review
volkerk’s picture

Status: Needs review » Needs work

prepareSave() is not defined in the interface, add check if entity implements the method before calling it.

chr.fritsch’s picture

Status: Needs work » Needs review
StatusFileSize
new974 bytes

Now with a check

daniel.bosen’s picture

Status: Needs review » Reviewed & tested by the community

I tested the patch in #3188665-5: Execute field mapping before displaying in IEF form. Works fine, and looks good to me

  • chr.fritsch committed c6b1429 on 8.x-2.x
    Issue #3188665 by chr.fritsch, volkerk, daniel.bosen: Execute field...
chr.fritsch’s picture

Status: Reviewed & tested by the community » Fixed

Committed

Status: Fixed » Closed (fixed)

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