If I select multiple files to upload into multiple image or file field and one of the files won't pass validation it will break the widget display, though all valid files are uploaded. This also is broken for valid images.

When removing an image, this is also broken.

| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 2172241-11.patch | 1.9 KB | swentel |
| #11 | 2172241-11-fail.patch | 1.28 KB | swentel |
| #10 | 2172241-10.patch | 643 bytes | swentel |
| #9 | image-widget-multiple-values.patch | 2.3 KB | webflo |
| #4 | Screen Shot 2014-02-16 at 13.37.09.png | 50.47 KB | swentel |
Comments
Comment #1
Anonymous (not verified) commentedComment #2
swentel commentedconfirmed
Comment #3
plopescChanging issue title and summary because I can reproduce the same problem in File widget, which is the Image's parent.
So I think the problem is in
Filewidgetinstead ofImageWidget.Regards
Comment #4
swentel commentedThe widgets are broken, also if If you upload valid files. Also clicking on 'Remove' when going back to edit a node, is completely broken
Comment #5
swentel commentedComment #6
swentel commentedComment #7
swentel commentedAlso, this is really major
Comment #8
plopescAfter digging in this issue for a while, these are my conclusions:
I'll try to work more on this along the next week, but not sure about the right way to fix this, because it looks related to the managed_file form element behavior. I'll also try to take a look to the ImageWidget bug.
Regards
Comment #9
webflo commentedLooks like some ajax code from FileWidget::process is missing in ImageWidget::process
Comment #10
swentel commentedAh nice find! Updated patch. By calling the parent function, the change is even smaller.
I'm really not sure whether we need a test for this ..
Comment #11
swentel commentedNow with tests. First one will have 2 failes, second one passes.
Comment #13
fabianx commentedRTBM - nice catch, regression of recent core patch
Comment #14
dries commentedCommitted to 8.x. Thanks.