0

I've been beating my head over this one and can't figure out how to solve it.

I have a content type with an image field, and I've set minimum dimension requirements for the field. The form to create or edit nodes of this type includes a field of type "managed_file" to deal with the upload of images. When an image is upload and it does not meet the minimum dimension requirements, a nice error message is added via ajax that reads "The specified file xxx could not be uploaded. The image is too small; the minimum dimensions are 150x150 pixels." This is great.

When I then upload a file that does fit all requirements, however, the error message remains.

Is this a bug in Core? Is there a good way to remove error messages in this situation when they are no longer relevant?

Thanks for any help!

apaderno
  • 28,547
  • 16
  • 75
  • 90
user724228
  • 13
  • 2

2 Answers2

1

This is a known issue (File validation error message not removed after subsequent upload of valid file - 1792032). A patch exists for Drupal 8 and that same patch should apply cleanly to Drupal 7. The issue is waiting on somebody to write tests before it can be RTBCd.

UPDATE: This patch has been committed to Drupal 8. Waiting on a backport to Drupal 7.

Adam Balsam
  • 785
  • 9
  • 15
0

The error message isn't supposed to appear when the file fits.

Try to push your limits a bit further or upload another file that is below your restrictions by some margin.

And kindly tell me how things went.

Muhammad.

Muhammad Reda
  • 26,379
  • 14
  • 93
  • 105
  • 1
    The case I'm interested in is when the file does NOT meet the requirements, but then another one is uploaded which does.It's not a matter of my changing restrictions or the size of a file being uploaded. The restrictions apply to users of the site and are there for a reason. – user724228 Apr 03 '12 at 02:34