Hello,
I have created a custom entity and a custom field of type "commerce_product_reference" (and an instance of this field for this entity).
Now I have this error showing up when disabling my module :
Invalid argument supplied for foreach() commerce_product_reference.module:810
The problem is commerce_product_reference_entity_info_alter() trying to alter the info of my "disabled" entity.
How to reproduce the problem :
- create a module implementing hook_entity_info(), thus creating a new entity ;
- create a field of type commerce_product_reference and the related instance, using commerce_product_reference_create_instance() or your customized code ;
- enable the module ;
- disable the module.
I think commerce_product_reference_entity_info_alter() should test whether $entity_info[$entity_type] exists or not (#810).
Comment | File | Size | Author |
---|---|---|---|
#2 | 1482038-2.product_view_modes.patch | 1.77 KB | rszrama |
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedCan you please try to see if the patch from #1361562-6: Re-enabling Commerce causes a PHP Fatal Error also fixes your problem?
Comment #2
rszrama CreditAttribution: rszrama commentedLooking into that entity info alter code, I see two things wrong:
Patch uploaded for the test bot.
Comment #3
rszrama CreditAttribution: rszrama commentedSweet. Committed.