Closed (fixed)
Project:
ImageField
Version:
6.x-3.10
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Mar 2009 at 15:09 UTC
Updated:
29 Jan 2012 at 08:45 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchI can't reproduce this error. When marking an ImageField as required it is shown with the required asterisk and throws an error if the form is submitted without uploading an image. I'd suggest upgrading to the beta3 versions of Image/FileField and CCK 2.2, though I don't know of any specific changes that cause a change in this area.
Comment #2
quicksketchFrom #412860: If required is ticked, user can still submit node if imagefield is blank (which is marked as duplicate):
Comment #3
quicksketchAh, I see why I didn't reproduce the problem: My content type had not only an image field but also a file field on the form. The presence of the file field had the effect of checking the requiredness of all other file (or image) fields on the form.
The source of this problem was my use of "module_invoke()" on the FileField widget function, which makes variables not be passed by reference. Calling filefield_widget() directly lets FileField modify the $form variable and add the extra #validate function. I committed the attached patch which solves this problem.
Comment #4
ivan zugec commentedPatch works perfectly.
Thanks alot.
cheers,
Ivan
Comment #6
Balbo commentedIs it possible I'm suffering the same issue with version 6.x-3.7 ?
Comment #7
gg4 commentedExperiencing this issue with 6.x-3.10
Comment #8
quicksketchI doubt this is the same issue (over 2 years later). Please open a new issue with detailed instructions on how to reproduce this problem, preferably from a clean install of Drupal.