Closed (duplicate)
Project:
Entity Reference View Widget
Version:
7.x-1.0-alpha2
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jul 2012 at 16:20 UTC
Updated:
2 Apr 2013 at 22:58 UTC
Comments
Comment #1
alieffring commentedI'm encountering the same error, and digging into it, it looks like the problem is that the data it's trying to assign to $target_type from
$form_state['field'][$field_name][$language]['field']['settings']['target_type']is actually in
$form_state['field']['#parents'][$profile_type]['#fields'][$field_name][$language]['field']['settings']['target_type']where $profile_type is the machine name of the Profile2 profile I'm using the Entity Reference View Widget in. Is the problem perhaps that $form_state is structured differently for profiles?
edit:
$element has a parameter named #parents which is an array, containing a single entry which is the name of my profile type. I don't know where this #parents array is coming from, so I can't figure out what things look like when there's more than one entry, but I have a hunch that it can be used with code that at least roughly resembles this:
Comment #2
tseven commentedI've posted a patch which fixes this issue on the current dev version of the module at:
http://drupal.org/node/1820278#comment-6636080
Comment #3
stella commentedduplicate of #1820278: Notice: Undefined index: in entityreference_view_widget_validate