Testing 2.0-RC6 with the dev version of CCK. I set it up, default, no multiple values required, maximum images 0. All I get is a message saying 'You can only attach images to this field. Delete an image if you wish to be able to upload different images.' On a whim, I checkmark multiple values, maximum 1. Finally, I get an upload box. Turning off multiple values gets me just the 'only images in this field' message again.

CommentFileSizeAuthor
#2 234876.patch781 bytesdouggreen

Comments

jpetso’s picture

Status: Active » Fixed

That issue has been found before and is already fixed in recent CVS checkouts, it won't appear in future imagefield releases (so 5.x-2.0-rc6 should be the last one with this error).

douggreen’s picture

Status: Fixed » Needs review
StatusFileSize
new781 bytes

The user can still set the max_number_images when multiple is set, however, this value is really meaningless. May I suggest that you not use $field['widget']['max_number_images'] at all when $field['multiple'] is set. I've attached an alternate patch (against RC6).

jpetso’s picture

The "min/max number of images" settings only make sense with multiple values - for single values it's automatically 1/1 (when required) or 0/1 (when not required). The point of the whole thing is that people with multiple values can't do more than 3 fields for example when they otherwise would be able to do arbitrarily many.

So, your patch makes little sense to me, especially since it has no effect on the single value case at all. Could you explain *why* max_number_images is meaningless when multiple is set, and how this is supposed to make more sense with your patch applied?

dopry’s picture

Status: Needs review » Needs work
jody lynn’s picture

Please make a new release candiate from 5--2 since in RC6 single image imagefields do not work at all (pretty serious bug I think).

sun’s picture

+1, please create a new RC7.

jpereza’s picture

One more vote for creating a new version RC7.

sun’s picture

Clarification: Requests to create a RC7 are unrelated to this patch. This patch is CNW, but current development snapshot is RTBC (ready for a new official release)!

dopry’s picture

Status: Needs work » Closed (fixed)

this is fixed in CVS.