When a users tries to upload an image that doesn't respect the minimum sizes an error message is displayed as usual, but if on a second attempt user tries to add a new image with the correct size it keeps displaying the error message, that said, the user has to refresh the window in order to upload the correct image.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

slashrsm’s picture

It seems that the problem might come from the module that uses Plupload element.

designerbrent’s picture

I'm having similar issues, however it is also duplicating the Plupload dialog box, leaving two upload boxes and nothing works to upload after that.

bigfatguy’s picture

Same problem! If the first image has correct size, and the second image is smaller than required I've got the following error:

Image 11.jpg could not be loaded. Image is too small. Minimum size - 800x800 pixels
Notice: Undefined index: _weight in function _field_sort_items_helper() (string 537 in file /modules/field/field.module).
Warning: usort(): Array was modified by the user comparison function in function filefield_sources_field_submit() (string 276 in file /modules/filefield_sources/filefield_sources.module).

Widget type: image
File sources
Advanced upload widget (Plupload)

If I use default drupal uploader it works fine.

Any patch or workaround?

vtkachenko’s picture

Status: Active » Needs review
FileSize
531 bytes

This error occures every time after form rebuild. When #id of element has --2, --3... suffix.

Values in form_state['input'] become transformed:

Expected value example:
edit-field-images-draft-upload-und-1-filefield-plupload-pud_0_tmpname

Real value example:
edit-field-images-draft-upload-und-1-filefield-plupload-pud-2_0_tmpname

So, my patch will accommodate pattern to this case.

hefox’s picture

I have a semi similar issue related to that bunch of code

The proble is that id is changing, but now instead of edit-upload, it's edit-upload--1 (for $id) but the input is edit-upload so it doesn't match even with the above code.

My issue is using a multiple file entity upload in an ctools modal window.