Problem/Motivation

In MediaEntityDropzoneJsEbWidget::submit, the media entity can be altered in
$event = $this->eventDispatcher->dispatch(Events::MEDIA_ENTITY_CREATE, new DropzoneMediaEntityCreateEvent($media_entity, $file, $form, $form_state, $element));.
This can result in a change in the name of the source field. But while $media_entity is set anew after this call, $source_field is not.

Proposed resolution

Set $source_field anew.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

VladimirMarko created an issue. See original summary.

VladimirMarko’s picture

Status: Active » Needs review
StatusFileSize
new1.08 KB

Made the change.

  • Primsi committed 68e8352 on 8.x-1.x authored by VladimirMarko
    Issue #2882419 by VladimirMarko: Reset $source_field after event call in...
primsi’s picture

Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

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