The following warning happens:
Notice: Undefined index: name in _field_ui_reduce_order() (line 72 of modules/field_ui/field_ui.admin.inc).

I am certain a 3rd party module is involved in my case with the form, but I am not certain which one.

The cause of the warning is that:

<?php
 
if ($a['name']) {
   
$array[] = $a['name'];
  }
?>

is no the same as:
<?php
 
if (isset($a['name'])) {
   
$array[] = $a['name'];
  }
?>

This can be found in the file: modules/field_ui/field_ui.admin.inc on line #72 as mentioned by the warning.
Immediately below the if case on line #72 is:

<?php
 
if (!empty($a['children'])) {
   
uasort($a['children'], 'drupal_sort_weight');
   
$array = array_merge($array, array_reduce($a['children'], '_field_ui_reduce_order'));
  }
?>

So, perhaps this is an oversight and they meant to have:

<?php
 
if (!empty($a['name'])) {
   
$array[] = $a['name'];
  }
?>

Given that this warning might happen as a result of a api mistake by a 3rd-party module, I am asking first for confirmation that the field_ui is or is not supposed to be checking if !empty instead of if variable

Files: 
CommentFileSizeAuthor
#1 field_ui_debug-1016144.patch910 bytesyched

Comments

Category:support» bug
Status:Active» Postponed (maintainer needs more info)
StatusFileSize
new910 bytes

field_ui_table_pre_render() internally builds a tree structure of table rows to determine rendering order.
Each entry in the tree structure is supposed to have a 'name', the root of the tree just has an empty name. So the check for if ($a['name']) instead of if (isset($a['name'])) is intentional.

I'm not sure what can lead to one entry not having a name. Most probably caused by a contrib module, but figuring out who's at fault and what to fix (core or the contrib module) requires some investigation.

Could you try the attached debug patch and post the resulting output (possibly big, please put that in a txt file) ?

Status:Postponed (maintainer needs more info)» Fixed

Thanks for your time, but with all of the module updates lately the problem stopped appearing at some point.
I am going to assume this problem was with a 3rd party module and was resolved in said module.

I will re-open if I manage to see this bug again and use your patch do debug.

Status:Fixed» Closed (fixed)

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

I don't know how helpful this will be but I got this after installing Drupal Commerce (Beta-2) and the associated required modules. The error appeared while I was setting up some fields that had been previously defined for other node types.

Status:Closed (fixed)» Active

Hi Yched, cross referencing to #1176454: Moving fieldsets into another region leaves children behind where you can find steps to reproduce with the field_group module (2 ways). Posting the error message from the patch above. Note, the output comes from the ajax error popup

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /system/ajax
StatusText: OK
ResponseText: Array
(
[body] => body
[field_tags] => field_tags
[field_image] => field_image
[dynamic_field] => dynamic_field
[title] => title
[links] => links
[comments] => comments
[node_link] => node_link
[author] => author
[post_date] => post_date
[ds_user_picture] => ds_user_picture
[group_article_group] => group_article_group
[_add_new_group] => _add_new_group
)
Array
(
[left] => Array
(
[] => Array
(
[name] =>
[children] => Array
(
[group_article_group] => Array
(
[children] => Array
(
[field_image] => Array
(
[name] => field_image
[weight] => 11
)
)
)
)
)
)
[right] => Array
(
[] => Array
(
[name] =>
[children] => Array
(
[group_article_group] => Array
(
[name] => group_article_group
[weight] => 0
)
)
)
)
[hidden] => Array
(
[] => Array
(
[name] =>
[children] => Array
(
[body] => Array
(
[name] => body
[weight] => 9
)
[field_tags] => Array
(
[name] => field_tags
[weight] => 10
)
[dynamic_field] => Array
(
[name] => dynamic_field
[weight] => 6
)
[title] => Array
(
[name] => title
[weight] => 7
)
[links] => Array
(
[name] => links
[weight] => 8
)
[comments] => Array
(
[name] => comments
[weight] => 5
)
[node_link] => Array
(
[name] => node_link
[weight] => 4
)
[author] => Array
(
[name] => author
[weight] => 1
)
[post_date] => Array
(
[name] => post_date
[weight] => 2
)
[ds_user_picture] => Array
(
[name] => ds_user_picture
[weight] => 3
)
[_add_new_gr..." type="text" id="edit-fields-add-new-group-group-name--2" name="fields[_add_new_group][group_name]" value="" size="15" maxlength="128" class="form-text" \/\u003e \u003cspan class="field-suffix"\u003e\u003c\/span\u003e\u0026lrm;\u003c\/span\u003e\n\u003cdiv class="description"\u003eGroup name (a-z, 0-9, _)\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/td\u003e\u003ctd\u003e\u003cdiv class="form-item form-type-select form-item-fields--add-new-group-format-type"\u003e\n \u003cselect id="edit-fields-add-new-group-format-type--2" name="fields[_add_new_group][format][type]" class="form-select"\u003e\u003coption value="div"\u003eDiv\u003c\/option\u003e\u003coption value="fieldset" selected="selected"\u003eFieldset\u003c\/option\u003e\u003coption value="tabs"\u003eVertical tabs group\u003c\/option\u003e\u003coption value="tab"\u003eVertical tab\u003c\/option\u003e\u003coption value="htabs"\u003eHorizontal tabs group\u003c\/option\u003e\u003coption value="htab"\u003eHorizontal tab item\u003c\/option\u003e\u003coption value="accordion"\u003eAccordion group\u003c\/option\u003e\u003coption value="accordion-item"\u003eAccordion item\u003c\/option\u003e\u003c\/select\u003e\n\u003c\/div\u003e\n\u003c\/td\u003e\u003ctd\u003e\u003c\/td\u003e\u003ctd\u003e\u003c\/td\u003e \u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003c\/div\u003e","settings":null},{"command":"insert","method":"prepend","selector":null,"data":"","settings":null}]

Status:Active» Closed (works as designed)

Ok closing this, looks like I had a version of Drupal core which didn't work fine - works ok on 7.2 now.

Version:7.0» 7.18
Status:Closed (works as designed)» Active

Notice: Undefined index: name in _field_ui_reduce_order() (line 81 of /mysite/modules/field_ui/field_ui.admin.inc).

Status:Active» Postponed (maintainer needs more info)

What's the setup ? In case you're using field group or ds, move it to it's respective queue.

Hi swentel, I'm using field group.

Project:Drupal core» Field Group
Version:7.18» 7.x-1.x-dev
Component:field_ui.module» Code
Status:Postponed (maintainer needs more info)» Active

I am getting this issue when I try to create a tab group in the Display Suite 'manage display' section. I get the following error:
LOCATION http://localhost:82/ran-bookstore/admin/structure/types/manage/product/d...
REFERRER http://localhost:82/ran-bookstore/admin/modules
MESSAGE Notice: Undefined index: name in _field_ui_reduce_order() (line 81 of C:\EasyPHP-5.3.8.1\www\ran-bookstore\modules\field_ui\field_ui.admin.inc).

I am using:
Drupal 7.18
PHP 5.3.8 VC9
Apache 2.2.21 VC9
MySQL 5.5.16

The group is created (I gave it the name book_info) but it doesn't display any horizontal tabs. What is the issue here?

/* Nevermind.. misunderstood the question */

Is this issue still occuring on latest version?

@zuuperman: yes, I'm still getting this error on 7.x-1.x-dev from 2013-Sep-15

I'm getting this problem also in the latest 7.x-1.x-dev when I move "Add new field" line in a previously created group.

If you are using field group you might check out comment #18 in this thread. I haven't had a chance to test it myself, but wanted to pass this on before I forgot. https://drupal.org/comment/5835954#comment-5835954