Closed (fixed)
Project:
Inline Entity Form
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jun 2012 at 17:20 UTC
Updated:
8 Jul 2012 at 18:21 UTC
Enabling this module in conjunction with Field Collection causes lots of errors.
Firstly, at admin/structure/field-collections I get this on each page load:
> Notice: Undefined index: bundles in field_info_bundles() (line 584 of /Users/joachim/Sites/alice-drupal/modules/field/field.info.inc).
The problem seems to be that field_info_bundles() is going through the result of entity_get_info() and finding commerce_product and commerce_line_item... even though I don't have Drupal Commerce installed at all!!
Comments
Comment #1
joachim commentedWhen I enable the module I get:
Invalid argument supplied for foreach() field.info.inc:219 [warning]
Invalid argument supplied for foreach() field.info.inc:219 [warning]
(via drush)
And in the UI, a LOT of errors which start with:
I'm going to go out on a wild guess and say these are ALL to do with this module trying to add entity data to entities that aren't there!
Comment #2
joachim commentedHere's the culprit:
Removing this makes it all go away.
Now how best to fix it? We could stick an isset() around each one, but IMO if this is to be a general purpose module, it might be better in the long run to think about moving Commerce-specific hooks and classes to a submodule.
Comment #3
joachim commentedComment #4
bojanz commentedAn isset is fine. Committed a fix.
Right now this module has no purpose outside of Commerce (the latest module to use it is commerce_discount).
Even if it did, the Commerce integration provides a nice example, and the Commerce specific hook is 9 lines of code long anyway,
not exactly the amount to warrant a submodule. So I have no plans to create one in the near future.
Comment #5
joachim commentedThat's fair enough. I was thinking that you'd save on the classes too, but those are autoloaded anyway.
This module definitely has applications outside of Commerce! I've been having a tinker with getting nodes to work with it this afternoon :)
Comment #6
bojanz commentedCool! Looking forward to the future.