Closed (fixed)
Project:
Content Profile
Version:
6.x-1.0-beta4
Component:
User registration module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2009 at 22:22 UTC
Updated:
13 Sep 2009 at 00:50 UTC
If a content profile node type that is used during registration contains fields that do not allow NULL then a query error is created due to trying to use a NULL value on a field that doesn't allow it.
The particular example where I'm having this issue is a node type with fields of type 'ca_phone' from the CCK Phone module.
Quick Setup:
1. Create new node type
2. Add at least one CCK US Phone Number to the node type.
3. Enable the node type as a content profile node, use on registration, and hide the phone field.
4. Try to create a user, upon creation sql errors are thrown.
Comments
Comment #1
fagoHm, what if you hide the field with cck field permissions? Does it work right then?
Comment #2
Steve Dondley commentedI see the same behavior with the US Phone Number cck field in the exact same scenario outlined above. I have edit permissions for all users turned on for this field.
Comment #3
Steve Dondley commentedIf it helps, here is the full error message:
user warning: Column 'field_phone_value' cannot be null query: INSERT INTO content_type_profile (vid, nid, field_dues_payer_value, field_first_name_value, field_last_name_value, field_phone_value, field_addres_value, field_dues_payer_pub_value, field_pays_dues_org_value, field_join_value) VALUES (539, 539, '0', 'Steve', 'Dondley', NULL, NULL, '0', '0', '0') in /drupal6/sites/all/modules/cck/content.module on line 1213.
This is probably something that should be handled by the phone_cck module better. The the other cck types that are hidden, like the address, don't react the same way.
Comment #4
Steve Dondley commentedOK, phone module looks to be the culprit with setting the db column to not allow NULL values:
http://drupal.org/node/146882
Until someone rolls an update to that module, use your favorite db administration tool to change the column for phone values to allow NULL values.
Comment #5
Steve Dondley commentedIssue resolved with patch to phone module: http://drupal.org/node/146882