When im using content profile, and showing some fields in the registration form, i need a certain field to be unique, so i used unique field module ( http://drupal.org/project/unique_field ), still its not working, this bug report (http://drupal.org/node/951772 ) seems to claim that this is a bug in content profile module . and that its not validating the node before saving when some fields are hidden in the registration form.
Comments
Comment #1
fagoContent profile validates the form, but it only used node_validate() if the whole form included:
See:
Maybe it could be changed to always do a complete node_validate(), but this'd require quite some changes.
Comment #2
nohup commentedfago,
What kind of changes do you think will be needed if we always call node_validate?
All non required CCK fields are anyway listed in "Hide form fields:", if the
auto_nodetitlemodule is installed, the function_content_profile_registration_get_field_selecttakes care of that as well. So the only field would be thebodyfield of the content type, which the "other" setting is hiding.On a simple test setup, I commented the if condition for "registration_hide" and let
node_validatebe called always, it worked.unique_fieldwas able to validate the field and nodebodywas not validated and was not visible as well.What are the situations you think this will fail? I am willing to write up the patch to fix this.
Comment #3
danisha commentedI use content profile module and enabled a content type to be shown on registeration. The problem I am facing is that when there is an validation error on the registeration page, like username already exists, The content type is saved in the database. How is this happening i have no idea about it. Please give me a possible solution.