Comments

dave reid’s picture

Issue summary: View changes
dave reid’s picture

Issue tags: +Media Initiative, +sprint
dave reid’s picture

Issue summary: View changes
cs_shadow’s picture

I'm pretty sure this used to work in the past so something recent must have broken this.

slashrsm’s picture

Issue tags: -sprint +D8Media
dave reid’s picture

Priority: Normal » Major
dave reid’s picture

Starting to become a larger annoyance. It seems that all of our form elements using #value => true on the second step of the form are not coming through into the form state on the ajax change, which means that the 'step' gets changed back to 'embed' and the first step of the form.

daniel.bosen’s picture

Does anyone have any idea how to fix this, or where I might start looking for fixing it myself?

dave reid’s picture

@daniel.bosen All I can tell is that our form values and storage values (which includes the current form "step") get lost when submitting anything via the second step AJAX, so it reverts back to the first step of the form. I'd welcome any help in debugging this.

chripu’s picture

StatusFileSize
new1.3 KB

See patch for a quick hack.

The data-entity-id or data-entity-uuid is not persisted via $form_state->set(...) across requests.
So submitting the values with hidden input fields solved the problem.

daniel.bosen’s picture

This patch works form me.

dave reid’s picture

Status: Active » Needs review
devin carlson’s picture

dave reid’s picture

Status: Needs review » Fixed

Converted to a PR at https://github.com/drupal-media/entity_embed/pull/180 and merged. I tried emulating the same fix that #2540850: (regression) EditorImageDialog alignment & captioning are not working did but it didn't seem to work.

  • Dave Reid committed 6b3b504 on 8.x-1.x authored by chripu
    Issue #2513546 by chripu: Fixed error on selection step when changing...
  • Dave Reid committed 992d725 on 8.x-1.x
    Merge pull request #180 from drupal-media/2513546-fix-form-state
    
    Issue...

Status: Fixed » Closed (fixed)

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