When a file is uploaded and a category has no options selected an items is added to filter array. This provides strange error messages when the file submitted is not of the correct type.

This patch removes the extra entries.

CommentFileSizeAuthor
webform.filter.patch861 bytesmarcingy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Status: Active » Needs work

I haven't been able to reproduce this issue recently (though I do remember experiencing it at one point). If it's still a problem in the latest version, this patch needs to be updated to solve the problem when saving components so that the "1" isn't saved at all, rather than building in an exception when validating.

quicksketch’s picture

Status: Needs work » Fixed

I may have taken this further than necessary, but since an update hook was needed anyway, I reorganized the save structure for file extensions to a much more reasonable format. It's now saved as a single array of valid extensions, rather than saving within categories. Of course it fixes '1' being saved as an extension also.

http://drupal.org/cvs?commit=118824

meeotch’s picture

Crap - sorry for the dupe. I swear on my teeth that I tried searching first.

Couple of questions: will this fix break existing webforms? Will it break the existing submissions in the database?

Basically - is it safe to wait until this makes it into a released version, or am I asking for trouble by allowing people to use the form as-is until a stable release is available?

Oh, and as always - kudos on the quick response time. It's nice to be using an actively maintained module.

quicksketch’s picture

No, the fix won't break existing Webforms in any way. I'd suggest waiting for the next release, or trying out the development version for the time being. I expect another version will be out int he next 1-2 weeks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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