As reported in this discussion (HS on registration form does not save values) there is a compatiblity issue between Content Profile and Hierarchical Select modules. In order to fix this, there is a code that should go into the content_profile_registration.module, in the content_profile_registration_user_register_submit function just before the "Create the node" and node_submit($node) lines.

The code is:

if (module_exists("hierarchical_select")){
    $query = "SELECT distinct field_name, multiple FROM {content_node_field_instance}
            INNER JOIN {content_node_field} USING (field_name)
            WHERE type_name = '{$type}' AND widget_type LIKE '%_hs'";
    $db_result = db_query($query);

    //We look for all fields
    while ($item = db_fetch_array($db_result)) {
    $field_name = $item['field_name'];
    $val = array();
    $field_table = $node->$field_name;

    if (isset($field_table['tids'])){
        foreach ($field_table['tids'] as $key => $value) {
            $val[] = array('value' => $value);
        }
    }

    if (isset($field_table['nid'])){
        foreach ($field_table['nid'] as $key => $value) {
            $val[] = array('nid' => $value);
        }
    }

    if (!empty($val)){
        $node->$field_name = $val;
    }
}

What is the right way to solve the problem?
Add this code to the next Content Profile release?

Comments

thadwheeler’s picture

I have the same sort of issue and I am not using this component of the Content Profile.

thadwheeler’s picture

Has there been any movement on this?

Balbo’s picture

I did get no feedback on this :-/