This is a cross-post to two other related issues:

#1001060: Undefined index _field_info_prepare_instance_widget
#1292090: Notice: Undefined index: module in _field_info_prepare_instance_widget() (line 382) <- Incompatibility with Entity Reference

The issue is that on Drupal 7.8 & 7.9 with sites that have Field Collections and Entity References enabled, have two warning messages per instance generated on a number of the Field UI pages.

These are:

Notice: Undefined index: module in _field_info_prepare_instance_widget() (line 382 of /home/htsa/public_html/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 350 of /home/htsa/public_html/modules/field/field.info.inc).

Disabling either module will stop these messages, so there is a conflict generated somewhere.

Files: 
CommentFileSizeAuthor
#7 default-node-entity-type-1329354-7-ref-issue-1292090.patch735 bytesAlan D.
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch default-node-entity-type-1329354-7-ref-issue-1292090.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]
#5 default-node-entity-type-1329354-3-ref-issue-1292090.patch640 bytesAlan D.
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch default-node-entity-type-1329354-3-ref-issue-1292090.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]
#3 default-node-entity-1329354-3-ref-issue-1292090.patch0 bytesAlan D.
PASSED: [[SimpleTest]]: [MySQL] 66 pass(es).
[ View ]

Comments

The call to entity_get_info() in hook_entity_info() appears to be the conflicting condition here. If you are happy to default this to 'node' or 'user', we could close #1292090: Notice: Undefined index: module in _field_info_prepare_instance_widget() (line 382) <- Incompatibility with Entity Reference at least for the meantime.

Yep, we can default to 'node', no problem. Do you have a patch for me?

StatusFileSize
new0 bytes
PASSED: [[SimpleTest]]: [MySQL] 66 pass(es).
[ View ]

K. Edited in text editor, double check no errors :)

PS: Credit to EvanDonovan

StatusFileSize
new640 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch default-node-entity-type-1329354-3-ref-issue-1292090.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]

Permission error, this time with content.

Status:Active» Needs review

Changing status

StatusFileSize
new735 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch default-node-entity-type-1329354-7-ref-issue-1292090.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]

I've updated the comment about using entity_get_info().

Status:Needs review» Fixed

Merged into 7.x-1.x.

Status:Fixed» Closed (fixed)

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