Closed (fixed)
Project:
Profile 2
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2011 at 05:15 UTC
Updated:
8 Jul 2011 at 00:39 UTC
The name field module uses hook_field_validate() and it throws the following errors on save.
Notice: Undefined index: array_parents in field_default_form_errors() (line 342 of C:\path\modules\field\field.form.inc).
Recoverable fatal error: Argument 2 passed to drupal_array_get_nested_value() must be an array, null given, called in C:\path\modules\field\field.form.inc on line 342 and defined in drupal_array_get_nested_value() (line 6331 of C:\path\includes\common.inc).
The strangest thing is that it appears to be caused by the user bundle field being validated when this shouldn't, i.e. it is on the user bundle, NOT the profile2 bundles.
Comments
Comment #1
alan d. commentedSorry, fairly light on info.
Install profile2 + name field (drupal.org/projects/name)
Add a name field to the user bundle
Configure a profile category and add a text field or something safe.
Try editing this profile tab, and the error should show up on save
Comment #2
alan d. commentedOK, tracked down the bug (it is a core bug)
So the user bundle fields are validated no matter what.
I'm leaving this open for tracking and I've opened: #1200910: user_profile_form_validate() is always called, even when $category != 'account'
Comment #3
alan d. commentedThis appears to be resolved as of Drupal 7.4 (or I simply can not replicate the edge case that triggered it any more)