Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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_nodetitle
module is installed, the function_content_profile_registration_get_field_select
takes care of that as well. So the only field would be thebody
field 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_validate
be called always, it worked.unique_field
was able to validate the field and nodebody
was 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 CreditAttribution: 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.