I am experiencing an issue with field permissions set through CCK. Even though I don't see a field, I am given an error upon submission that the field has not been filled in. I previously thought the issue had something to do with CCK permissions handling but that might not be the case because the module for setting permissions seems to be very straightforward.
The original issue is posted as.
I have a picture node which contains a date field and an ImageField. However, there are several user roles that I would like to restrict while creating picture nodes. For my use, I would like to have an unlimited size, for other users to set limits lets say to 800x600.
I created 2 ImageField fields. One (unrestricted dimensions) is visible to me, the other one (restricted) is visible to others. In both cases, they are set as "required".
All seems to go fine till the point when I want to submit the node. Then, even though I don't see the other field (the restricted one), I am warned that I have not uploaded a picture (through the field I don't see). It does not seem logical to me that I can set a restriction on editing fields but not on creating them.
Even though I am using the ImageField module in this case, it is very likely to appear in the FileField module as well as it is the base module for ImageField.
Am I doing something wrong here?
- CCK version: 6.x-2.6
- ImageField version: 6.x-3.3
- permissions for files and tmp: 775
- download method: public
- imagefield config: As for this issue, both fields are set as required with only 1 acceptable file each. One has set filesize and dimensions limits, the other one does not. I am also using the FileField Paths module.
- expected result: I expect to upload an image through the visible field only while the other (not visible one) field does not bother me about not having uploaded anything
- unexpected result: I receive an error from the not visible field that I have not uploaded a file
- steps to reproduce: Set a new content type with 2 imagefields in it. Have both set as required. Not install the CCK field permissions module and have one field visible for one user role, the other visible for another role. Now as one field is invisible for one of the role, upload an image into the visible field and try to submit the node. You should receive an error that the field (the hidden one) is required to have an image uploaded.