When reordering some privatemsg fields for display, I came across this error/notice:

Notice: Undefined index: name in _field_ui_reduce_order() (line 81 of /home/account/public_html/drupal/modules/field_ui/field_ui.admin.inc).

Comments

Jorrit’s picture

Version: 7.15 » 7.22

The code that causes the error is:

if ($a['name']) {
    $array[] = $a['name'];
  }

Shouldn't that be something like:

if (isset($a['name'])) {
    $array[] = $a['name'];
  }

or

if (!empty($a['name'])) {
    $array[] = $a['name'];
  }
hanpersand’s picture

Priority: Minor » Major

I'm unable to use Display Suite in one instance because of this notice. When I get it, I'm unable to drag and drop properly. It only happens when I enable DS layouts and then try to reorder fields. I can't "let go" of a field when dragging, and only one of over a dozen fields appears on the front end, with the notice.

This may only happen when I'm using a fieldset. Going to test that hypothesis next.

hanpersand’s picture

When this notice is showing, I'm also getting an Ajax error--not sure if related.

An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /system/ajax
StatusText:
ResponseText:
ReadyState: 4

hanpersand’s picture

I wonder if this is really a problem with Display Suite, as it's only happening when layouts are enabled. Going to check queue over there.

hanpersand’s picture

Filed this under Display Suite http://drupal.org/node/1989108

swentel’s picture

Priority: Major » Normal

This is a contrib thing and not major at all as there's no way to reproduce this with core only.

Zero4ffect’s picture

I am getting this error and am not using Display Suite.
After some testing it appears that this error occurs when you create a field contained within a fieldgroup in the same Save action.

pjcdawkins’s picture

Status: Active » Postponed (maintainer needs more info)

rcube: your message was from 5 months ago - is this still a bug?

j4’s picture

Yes this is still an issue..is there any solution?

seesoe’s picture

Issue summary: View changes

no solution?

kcannick’s picture

Having the same issue... I even enable weights and manual set them and field groups but upon saving I get error and fields go wherever they want.

nancydru’s picture

I got this in fairly basic Drupal 7.28 when creating a new field and changing its order.

joachim namyslo’s picture

@nancyDru

Do you have field_groups and or field_groups_table in use? same problem here, when these two modules are enabled

nancydru’s picture

Yes, I use Field Groups.

joachim namyslo’s picture

Issue for fieldgroups created If you have some suggestions to this discription dont hasitate to drop a comment here:

https://www.drupal.org/node/2303305

cmstom’s picture

I resolved this by disabling and re-enabling Display Suite modules.
edit: Actually it does still show up still on every other page load inside Manage Display. Is still showing up even after disabling all Display suite modules.

dcam’s picture

Version: 7.22 » 7.x-dev
Issue tags: +Needs steps to reproduce

We could really use some steps to reproduce this issue, preferably just using Drupal core.

davewilly’s picture

I have just got this after enabling display suite layout on a content type display:
Notice: Undefined index: name in _field_ui_reduce_order() (line 81 of /var/www/html/modules/field_ui/field_ui.admin.inc). =>

I used bundle copy to create the content type via an import, which has all been working fine, until enabling a display suite layout.

davewilly’s picture

Not an ideal solution, but if the "Manage display" of your view mode page is timing out with the above error, due to many nested field groups and you can't disable the Display suite layout, you can manually unset it in database:

delete from ds_layout_settings where bundle = 'your_bundle_type' AND view_mode = 'your_view_mode' limit 1;

Refresh the page and the layout will now revert to default (No Display suite layout).
In order to re-add the Display suite layout, you will need to flatten the field group nestings by dragging them out until there is no nesting, and then save. Once saved you can now re-add a Display suite layout, e.g. One Column, and then have some more fun dragging your field groups back into their parent/child nestings.

Laborious - but works.

Status: Postponed (maintainer needs more info) » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.