getting the following errors when I try to access the manage display screen for my content types with conditional fields:

Undefined index: field_urgent_tags in conditional_fields_form_after_build() (line 456 of .../sites/all/modules/conditional_fields/conditional_fields.module).
Recoverable fatal error: Argument 2 passed to drupal_array_get_nested_value() must be an array, null given, called in .../sites/all/modules/conditional_fields/conditional_fields.module on line 457 and defined in drupal_array_get_nested_value() (line 6341 of .../includes/common.inc).

Comments

justmagicmaria’s picture

Same error. Subscribe.

I have temporarily worked around the issue by adding these three lines to the top of the foreach loop at line 415 of condition_fields.module. I'm sure it's not the correct fix, so I won't bother with a patch.

<?php
    foreach ($dependent_info['dependees'] as $dependee => $dependency) {
+      if (!array_key_exists($dependee, $form['#conditional_fields'])) {
+        continue;
+      }
?>
peterpoe’s picture

I need some information to verify this issue:
What page is "the manage display screen for my content types"? admin/structure/types/manage/CONTENT_TYPE/fields or admin/structure/types/manage/CONTENT_TYPE/dependencies?
What kind of field/widget is field_urgent_tags?

laroccadahouse’s picture

field_urgent_tags is a term reference field

I have a date field that is dependent on that field

"manage display" refers to: admin/structure/types/manage/CONTENT_TYPE/fields

peterpoe’s picture

Some more questions:
- Have you updated to the latest dev? Conditional Fields shouldn't do anything in that page.
- Which kind of widgets are those fields? (textfield, select, autocomplete, etc)

laroccadahouse’s picture

I'm using 7.x-3.x-dev (2011-Aug-30). I will update to the latest release this afternoon.

the term reference field is a select list and the date field uses the pop-up calendar.

laroccadahouse’s picture

updated to sept 2 release. still getting error.

eliasdelatorre’s picture

Getting the same error listed here, at lines 415 and 416.

I'm running:

  • Drupal 7.7
  • Field 7.7
  • Field SQL Storage 7.7
  • Conditional Fields 7.x-3.x-dev

My widgets are only:

  • Text fields
  • Text areas - with CKEditor enabled
  • Integer number lists

Fixed with JustMagicMaria 's solution tho.

Thank you guys, I'm on due date and this helped me at this very moment.

somanyfish’s picture

subscribe

jyee’s picture

subscribe

froeser’s picture

subscribe

peterpoe’s picture

I'm stuck here: conditional_fields_form_after_build() should never run on that page. This error probably arises in conditional_fields_element_after_build(), where $form['#conditional_fields'] is populated. But in my setup (latest dev), $element['#field_name'] at the beginning of the function is correctly not found and the function returns immediately.

peterpoe’s picture

Status: Active » Fixed

This was fixed in commit 890c237.

Status: Fixed » Closed (fixed)

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