Improve/fix handling of bubbleable metadata in entity_embed#187
Improve/fix handling of bubbleable metadata in entity_embed#187wimleers wants to merge 1 commit intodrupal-media:8.x-1.xfrom
Conversation
There was a problem hiding this comment.
How is it ok to remove the metadata about the entity itself? Are we assuming that every field formatter that can be re-used to display an embedded entity correctly has this metadata in its render API array?
There was a problem hiding this comment.
This also looks like we're losing the metadata from the access check.
There was a problem hiding this comment.
We can remove the second line because we are rendering the embedded entity, that will itself include the cacheability metadata of the entity.
There was a problem hiding this comment.
This also looks like we're losing the metadata from the access check.
Why?
There was a problem hiding this comment.
LOL, because I couldn't see the very next line:
$result->addCacheableDependency($access);
See https://www.drupal.org/node/2593379.