Problem/Motivation
The module is throwing this warning:
Warning: Undefined array key "#entity_type" in sdc_display_entity_view_alter() (line 342 of modules/contrib/sdc_display/sdc_display.module).
In my case the $build array does not contain the entity type.
Steps to reproduce
- Enable any view mode to be rendered as component.
- Render the entity using that view mode in anywhere.
Proposed resolution
Instead of getting the entity_type from the build array, we can get it from the entity itself, all entities should have the method getEntityTypeId().
Issue fork sdc_display-3382362
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jidrone commentedCreated MR and moved to needs review
Comment #4
e0ipsoThis looks good to me! Merging.
Comment #5
e0ipsoComment #8
e0ipsoI added a second commit to fix issue credit.