After updating fieldgroup to the 1.0 version, the username and password fields, which I had in a fieldgroup, where not displayed anymore. Disabling the fieldgroup module or removing the field group helped.

hth,
walter

Comments

danepowell’s picture

I'm seeing this as well- no matter what type of group the username/password field is in, it doesn't show up.

dippers’s picture

I have this problem as well.

It appears the form group for a user called 'account' has not #type set and therefore when the form is processed there is no default #process and therefore the account element is maked as #processed=FALSE by drupal_process_form. An unprocessed element is not allowed inside a fieldgroup (field_group.module line 1205) and therefore the user account settings are not seen.

Not sure if this is a problem with fieldgroup or the user module.

Stalski’s picture

Does anyone here have a patch I can review to fix this problem? Or an indication where to start looking?

dippers’s picture

The fix is to add a #type to account. You can easily do this in a hook_form_alter

function MODULE_NAME_form_alter(&$form, &$form_state, $form_id){
  if ($form_id == 'user_profile_form'){
    if (isset($form['account'])) $form['account']['#type'] = 'container';
  }
}

I'm not exactly clear why field_group makes the test of #processed but assuming it is valid the ultimate fix must be with the user module.

Stalski’s picture

@Dippers: well that's a problem field group has when checking if a field group is empty. I can check the access property , check if there are children. That is succesfull.
However I need to find the best fix for how field_access works. That leaves a child 0 in the tree, so field group does not see this. In the 0 delta element, there is no child element. The only thing I found there taht is different, is the #type attribute. Before I checked on the #processed indeed.
I will do some more tests with this as some other issue is about this as well. See #1168954: Account default fields dissapear when they are inside a group and #1169276: upgrade from 7.x-1.0-rc2 to 7.x-1.0 account field not showing within vertical tabs option.

Stalski’s picture

I dont have errors anymore in dev. Could you try out dev, that only checks for the type.

dippers’s picture

I can confirm the latest dev fixes the problem of the user account details appearing within a fieldgroup without needing to set #type on account.

Joe Vallender’s picture

Working for me too, thanks

danepowell’s picture

Status: Active » Closed (duplicate)

I can confirm that this is fixed, and furthermore I think it's a duplicate of the issues linked to above