Hello,
I'm having this error:
Notice: Undefined index: view modes em field_view_mode_settings() (line 649 of /modules/field/field.module).
Warning: Invalid argument supplied for foreach() in field_view_mode_settings() (line 649 of /modules/field/field.module).

And in the title appears:
Unconnected field collection item

I'm using:
Field collection 7.x-1.0-beta4
Field Collection Table 7.x-1.x-dev

Thanks for your help.

Comments

evgeniysolodkov’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev

Hello, I have the same using last dev.

It happens when an author creates an unpublished node with field collection items (I'm using Workbench Moderation module, and authors are allowed set node status to draft or needs review - not publish node immediately). When the node is published by admin errors are gone.

It looks like revision implementation doesn't cover this case and field collections are retrieved from field_data_.... table instead of field_revision_... table.

I would appreciate any help on this.

waveer’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta5

I also have the same problem.

Notice: Undefined index: view modes in field_view_mode_settings() (line 627 of E:\Sites\order\modules\field\field.module).
Warning: Invalid argument supplied for foreach() in field_view_mode_settings() (line 627 of E:\Sites\order\modules\field\field.module).

I have a content type that used the Field collection, and the author can't publish the content, need other roles to review and publish.
I have a views that display the own unpublished content for each user.I have give them the permission view own unpublished content.
I have used the view_unpublished module and Field Permissions.
when i dont give the author the permission "View any unpublished content" for this content type, the views can be access but dispplays nothing.
when i give them the permission "View any unpublished content", then they can see the contents in the views display. and when they view their unpublished content in full page mode, the error message has gone.

I am not sure the error is caused by Field collection, I just search google, and see this issue.
But it seems like the Field collection field don't hook the view mode and permission in the array, I just guess, I am not professional developer.
I hope, if the error is involved in Field collection, my message can give a little help for the issue to be solved.

Thanks the module developer!

waveer’s picture

maybe i am wrong,
when i use the view_unpublished module with 7.x-1.x-dev version
my problem has been fixed.
sorry for disturb

katannshaw’s picture

I'm having the exact same issue as comment #1 with 7.x-1.0-beta5. I found another issue report listed under core with the same error. It's titled Undefined index: view modes in field_view_mode_settings().

a.milkovsky’s picture

If you have field_collection_table enabled this can help: field_view_mode_settings

ivanhelguera’s picture

Issue summary: View changes

I also have this problem

nancydru’s picture

I applied the patch in #5 and am still getting this during search indexing.