Hello,

I used cck_select_other like profile field, and I always recived this error:

Notice: Undefined index: select_other_list en cck_select_other_widget_validate() (línea 168 de /home/agrajal/proyectosphp/c0423-achipia/trunk/02_Desarrollo/02_Fuentes/sites/all/modules/contrib/cck_select_other/cck_select_other.module).

The problem, is that in the function cck_select_other_widget_validate(), the varible $element[#parent] has 5 items,

#parents	Array [5]	
	0	profile_main	
	1	field_institution	
	2	und	
	3	0	
	4	select_other_text_input	

And the latter value "0" is not taken into consideration.

For fix this bug, I used this patch.

Ciao

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mradcliffe’s picture

I think something similar to a commit in #1024654: Not working for profile2 entity and field_conditional_state needs to be done to get array parents properly in this case.

mradcliffe’s picture

Status: Active » Needs review
FileSize
3.95 KB

Refactored array parents thing now that array parents is correct in the element. I think this should work, need to see if it passes current tests.

mradcliffe’s picture

Status: Needs review » Fixed

Pushed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.