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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

netsensei’s picture

Dang! 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.

kelvinleehk’s picture

Count me in LOL :P

netsensei’s picture

FileSize
513 bytes

New attempt. This one works for me.

swentel’s picture

Status: Active » Fixed

Comitted and pushed, thanks!

kelvinleehk’s picture

Confirm #3 worked!

Thanks @Netsensei!

Status: Fixed » Closed (fixed)

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

ericinwisconsin’s picture

Didn't work for me. My issue is on line 872 of the ds_extras.module.