Closed (works as designed)
Project:
Unique field
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
23 Feb 2008 at 23:31 UTC
Updated:
27 Jun 2015 at 13:00 UTC
Jump to comment: Most recent
Comments
Comment #1
arithmetric commentedStephen,
Thanks for your insight on this. Since it's possible to make a field 'required' (meaning the field cannot be empty), it makes sense to me to change the behavior of unique field to not consider null/empty values as being duplicates of each other. I've made this change in the revision dated after 03/13/2008. Let me know how that works for you.
Thanks, Joe
Comment #2
scedwar commentedGood work. I'll update and report back.
However, can you do a new dev release as I can see the commit but there doesn't seem to be a release packaging up the changes. Am I missing something?
Thanks
Comment #3
arithmetric commentedThe dev releases are automatically packaged every 12 hours. It should be available now.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
giorgio79 commentedI seem to be getting this in the latest dev for 7x
Comment #6
johnv@giorgio79, I just enabled unique_field, and I do not get this error.
- enable unique_field
- set 1 field of 1 content type to be unique. All other settings not touched.
- set field tot be not required.
- save node with unique_field-field filled. ==> I get an error when using the same value twice.
- save node with nunique_field-field empty ==> no error when saving the second node with empty field.
Do you still get this error?
Comment #7
Coupon Code Swap commentedI am having an issue with this. I am using 7.x-1.0-rc1 and it does not seem to matter whether the field is required or not. In my case, I need to specify that the field is required. However, I do not want checking to take place for NULL values. I am using the ajax patch posted here:
https://drupal.org/node/1926346
If the field that is checked for uniqueness is left empty, a big long list of matching nodes is displayed (both with the ajax checking error message and with the regular message if a user attempts to submit the node), even though the field for the matching nodes contains values and thus the error should not be displayed. I would like to turn off checking when the field is left blank and just have a regular message that the field is required if a user attempts to submit a node and the required field was left empty.
Comment #8
pravin ajaaz commented