Autosave in combination with the Media library is breaking part of the UX.
When I edit an existing node with a media field that contains an image, and try to delete this image, the Ajax call returns a wrong form.
See the attached screenshots:
1. autosave-media-start This is the start situation, a Media field with an image attached to it. Now press 'Delete' (or 'Verwijderen' in Dutch)
2. autosave-media-after An Ajax call is made that returns the new form for the Media field. The form now wrongly includes a text input, attach button and manage image crops
2. autosave-media-intended It should have returned a form that looks like this.
I'm not sure whether or not this is a bug in Media or Autosave, but when I disable Autosave it works an intended.
I'm running both Autosave and Media latest versions:
Media 7.x-2.0-alpha4+41-dev and Autosave 7.x-2.2+16-dev
Comment | File | Size | Author |
---|---|---|---|
#4 | autosave-prevent-undefined-with-media-module-2532890-4.patch | 671 bytes | atourino |
autosave-media-intended.png | 7.13 KB | Koen.Pasman | |
autosave-media-after.png | 10.31 KB | Koen.Pasman | |
autosave-media-start.png | 41.94 KB | Koen.Pasman |
Comments
Comment #1
Koen.Pasman CreditAttribution: Koen.Pasman commentedComment #2
Koen.Pasman CreditAttribution: Koen.Pasman commentedComment #3
Koen.Pasman CreditAttribution: Koen.Pasman at Aubergine IT commentedComment #4
atourino CreditAttribution: atourino at Rootstack commentedThis is a small patch I'm using to prevent autosave from crashing Javascript virtual machine when media module is in use.
Comment #5
wjackson CreditAttribution: wjackson commentedThe patch in #4 works for me!
Updating status to RTBC.
Thanks atourino!
Comment #6
David_Rothstein CreditAttribution: David_Rothstein at Tag1 Consulting commentedLinking to a possibly related issue.
Comment #7
a.gursoy CreditAttribution: a.gursoy commentedHi, we are using Media Module 7.x-2.0-beta2 and Autosave 7.x-2.2 together.
We applied patch in #4 but it doesn't work for us.
Problem Details:
If image field empty before autosave work. It saves this empty state as image attached. That's why when you click restore, it does not show 'browse' button.Instead, shows 'attach' button even there is no image attached.
Screenshots:
http://prnt.sc/cvst9s
http://prnt.sc/cvstn3