If you're upgrading from an old database, or something went haywire (i.e. module disabled) then ds_layout_settings can contains references to bundles that don't exist anymore. DS reads the info in ds_layout_settings and tries inadvertently to add layouts to non-existent bundles in hook_entity_info_alter
.
Other modules using the (faulty) information in $entity_info might throw errors or, worst case, just break.
I'm referring to #1356828: Undefined index: label in commerce_entity_access_permissions() as an example.
Patch adds a check: only add a layout if the bundle does already exist in entity_info. Otherwise: ignore the bundle.
Comment | File | Size | Author |
---|---|---|---|
#3 | ds-patch-entity-info.patch | 513 bytes | netsensei |
ds-patch-entity-info.patch | 537 bytes | netsensei |
Comments
Comment #1
netsensei CreditAttribution: netsensei commentedDang! Ignore the patch. Must be drunk or something. ;-) I need to check if the bundle defined in $ds_layout settings exists in $entity_info before adding the layout.
Comment #2
kelvinleehk CreditAttribution: kelvinleehk commentedCount me in LOL :P
Comment #3
netsensei CreditAttribution: netsensei commentedNew attempt. This one works for me.
Comment #4
swentel CreditAttribution: swentel commentedComitted and pushed, thanks!
Comment #5
kelvinleehk CreditAttribution: kelvinleehk commentedConfirm #3 worked!
Thanks @Netsensei!
Comment #7
ericinwisconsin CreditAttribution: ericinwisconsin commentedDidn't work for me. My issue is on line 872 of the ds_extras.module.