* Notice: Undefined index: #groups in field_group_build_entity_groups() (line 1641 of /sites/all/modules/field_group/field_group.module).
* Warning: Invalid argument supplied for foreach() in field_group_build_entity_groups() (line 1641 of /sites/all/modules/field_group/field_group.module).
* Notice: Undefined index: #entity_type in ds_entity_variables() (line 770 of /sites/all/modules/ds/ds.module).
* Notice: Undefined index: #bundle in ds_entity_variables() (line 770 of /sites/all/modules/ds/ds.module).
* Notice: Undefined index: #view_mode in ds_entity_variables() (line 770 of /sites/all/modules/ds/ds.module).
* Notice: Undefined index: view modes in field_view_mode_settings() (line 663 of /modules/field/field.module).
* Warning: Invalid argument supplied for foreach() in field_view_mode_settings() (line 663 of /modules/field/field.module).

I haven't pinned down the reason, but I have just expanded my full content view by additional fields. will try to incrementally revert the changes.

Comments

moniuch’s picture

I added an empty group, which I haven't filled with any fills and the error seems to be gone. I deleted that fake group and still no errors. Will keep you posted. Probably something about array initialization.

moniuch’s picture

Sorry, premature joy. The errors returned. After a subsequent refresh.

Anonymous’s picture

I've got the same errors, but I do not have DSuite installed, but Taxonomy Display - if that has any influence. I only have those:

Notice: Undefined index: #groups in field_group_build_entity_groups() (line 1641 of /sites/all/modules/field_group/field_group.module).
* Warning: Invalid argument supplied for foreach() in field_group_build_entity_groups() (line 1641 of /sites/all/modules/field_group/field_group.module).

moniuch’s picture

Well, I do have Taxonomy Display as well. I haven't mentioned because there was no mention of TD in the error messages.

But you are right in that currently I'm seeing the error messages on taxonomy pages only. This lead me to further observation:

My taxonomy, besides the default Description and Title fields, has custom fields. The custom fields are used on both view modes that I'm using: taxonomy page and taxonomy teaser, both handled by DSuite 2-column layout. None of the displays uses a group field. However I seem to have noticed that the errors appear when I view a taxonomy page that has some custom fields not filled yet - once I enter the info, the errors disappear.

I'm not sure as per the role of Display Suite, it may be none in this case.

nils.destoop’s picture

I installed the taxonomy display module, and configured my vocabulary this way:

no field groups
display default: 2 col stacked

right:
- title

left:
- description
- extra field

But i don't see any notices. Not from DS, not from field_group, and not from field.
Any more info to reproduce?

moniuch’s picture

What if you make a content type which uses field group, and assign a reference term to each node. Please make sure you use some terms that do not have any value in the extra field.
Then, make a view which lists nodes for a given taxonomy/term/% and see what happens.
Please give yourself a decent amount of clicking time, as those errors seem to occur irregularly, intermittently.

atlea’s picture

Hi,

I'm seeing this on term pages using the Taxonomy Display module as well.

It is using the option "Use Views for displaying associated content.", on standard "Taxonomy term page"-view mode (display/full), with no DS layouts selected and no field groups added to the term pages.

The view does not use fieldgroups or any DS magic. It does use Rendered Entity with a custom view mode (using a one column DS layout) as its row plugin. No field groups here either.

Atle

frixos12’s picture

subscribing

nicholasyonko’s picture

I found this issue with users that are not uid 1. Couldn't find any permissions related to field_group specifically.

Stalski’s picture

Status: Active » Postponed (maintainer needs more info)

Can you give us the steps to reproduce this, thx in advance

nicholasyonko’s picture

Found that the issue was not uid 1 related, but related to some specific users on their profile page where I was grouping fields added to their account. I couldn't figure out what was causing the issue. I deleted the user and recreated it and the issue went away.

patoshi’s picture

having the same issues.. im not even using any field groups for the content type..

screenshot: http://prntscr.com/6qpma

henrijs.seso’s picture

I think it started when I moved Entity Reference field (OG related) in fieldgroup. Could be related to Entity Reference. Anybody else did that and got these warnings and notices?

henrijs.seso’s picture

StatusFileSize
new323 bytes
new16.04 KB

Looked at code and here is possible quick solution. I have no idea how this would influence module, notices went away. See screenshot for reason why $element['#groups'] could pass !isset().

nils.destoop’s picture

Status: Postponed (maintainer needs more info) » Needs review

mansspams, i committed your patch to the dev. Can the others check if this also fixes the issue?

philsward’s picture

I just got done changing mine (had to make the change on line 1659 instead of 1622) but so far, I haven't seen an error. I'll try to post back out here after I've had some time with it and report my findings.

I will note that I don't have Display Suite, Nor Taxonomy Display installed. My site is an upgrade from D6 -> D7 and the only "additional" taxonomy module I have installed is "Content Taxonomy" (which won't let me remove on account of its own issues...)

Update: I'll note that having the line set to !isset, If I go from a taxonomy term page to the home page, the error would pop up without fail. Changing the code to empty as suggested in the patch of #15, the error appears to be completely gone.

nils.destoop’s picture

Status: Needs review » Fixed

Ok, marking this as fixed then.

philsward’s picture

Sounds good, I'm guessing this has been included in some of the latest dev's because I haven't received the error since upgrading to the dev on the 4/3/2012. (haven't tried the dev from the 6th yet)

Status: Fixed » Closed (fixed)

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