Problem/Motivation

We would like to make changes to the media entities *before* they are shown to the user (like filling out the name field for example). The problem is that the CREATE event is only fired when submitting the filled out forms which I think is actually a bit inconsistent with the other widget but we can't change that now as people might rely on that behavior.

Proposed resolution

Add a new event, trigger that in submitEdit()

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir created an issue. See original summary.

Berdir’s picture

Status: Active » Needs review
FileSize
2.21 KB
Berdir’s picture

Switching media types during upload is a gift that just keeps on giving. Now the submit() can fail because the source field might be different for the different media entities.

Berdir’s picture

Rerolled.

The last submitted patch, 3: dropzonejs-ief-precreate-2959784-3.patch, failed testing. View results

  • Primsi committed bd0f9de on 8.x-2.x authored by Berdir
    Issue #2959784 by Berdir: Add A PRECREATE event to allow to alter the...
Primsi’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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