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

fago’s picture

Status: Active » Postponed (maintainer needs more info)

Hm, what if you hide the field with cck field permissions? Does it work right then?

Steve Dondley’s picture

Status: Postponed (maintainer needs more info) » Active

I 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.

Steve Dondley’s picture

If 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.

Steve Dondley’s picture

OK, 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.

Steve Dondley’s picture

Status: Active » Fixed

Issue resolved with patch to phone module: http://drupal.org/node/146882

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.