Hello,
thanks for great module.
While using Rel & Field_groups modules I get this error:
Notice: Undefined index: account in user_account_form_validate() (line 1215 of /home/scienceplaza.org/public_html/modules/user/user.module).

Recoverable fatal error: Argument 2 passed to drupal_array_set_nested_value() must be an array, null given, called in /home/scienceplaza.org/public_html/includes/form.inc on line 2436 and defined in drupal_array_set_nested_value() (line 6300 of /home/scienceplaza.org/public_html/includes/common.inc).

This is only on "user_profile_form"
Enabled modules in attached TXT file.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nils.destoop’s picture

Project: Field Group » Renderable elements
Version: 7.x-1.1 » 7.x-1.x-dev

This error also occures when field group is disabled. Moving this to rel.

swentel’s picture

hmm, this is going to be a hard one to tackle. rel_field_attach_form() rips out the complete form, and the submit/save/validate callbacks are expecting certain values in certain places in the form_state array. Will need some serious thinking how to move those back.

durum’s picture

Hi,

I am trying to panelize user/%/edit form with its individual elements on seperate regions, i.e Email and Password fields on the left side and other fields on the right.

Am I on the right issue here?

dtarc’s picture

I'm getting these two errors as well. I was really excited to see how well ds + rel themed the user form but disappointed to see that submitting the user form no longer executes.

I'm going to dig around a bit to see if I get anywhere but if I don't find something soon I might just not have the user profile form using rel.

In some of my testing I noticed that rel calls _field_ui_bundle_admin_path() but field_ui is not listed as a dependency of the module.

dtarc’s picture

I think I have a fix for this one. I'm not quite sure if it will quite work with field group or not.

The issue is that core does a few minor things on user profile validate, and one thing it does with the email address is causing problems.

Core needs to find the following property: $form['account']['mail']. Or more specifically, it needs $form['account']['mail']['#parents'].

When rel runs on the user profile form, it goes through and empties out all the core user properties like name, password email out of the account container, and then it deletes the account container.

This patch does not delete elements of type container, and as each child is taken out of the container, a skeleton child with the same name is being put back in as a child of the container. And the container is having its #tree property set to TRUE.

It could be that this is too generic a solution, and rather than doing this for all elements of type container and their children, maybe it should only be done for the user entity and only for the mail element of the account container.

This is what I'm using for now, and I"m getting a proper user save. I still need to verify that this will work with field group.

Any advice appreciated, and I'm willing to do a bit more work to get this patch in. I think Renderable elements is the only solution that comes close right now for user profile styling.

dtarc’s picture

Status: Active » Needs review
dtarc’s picture

This seems to work fine with field_group module in the mix as well.

dtarc’s picture

This patch is a bit better.

dtarc’s picture

The patch in #8 wasn't dealing with user timezone properly, this patch fixes it.