Until we can do #1977206: Default serialization of ConfigEntities some day (?), each ConfigEntity type needs to take care of removing their potentially huge runtime properties before serialization.

For EntityDisplays, that includes the instantiated widget/formatter plugins, or the field definitions.
EntityFormDisplay implements _sleep() to take care of that, but the same logic also applies to EntityViewDisplay.

EFDs just more badly need it, since they typically get serialized as part of entity forms, and EVDs don't have that case. Still, EFDs and EVDs should stay symmetrical.

--> the _sleep() implementation should move to EntityDisplayBase

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug: EntityViewDisplays can be huge if serialized
Issue priority Normal: AFAIK we don't have a case in core where they do get serialized
Disruption None
CommentFileSizeAuthor
#1 2405127-EntityDisplayBase_sleep-1.patch1.9 KByched
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

Status: Active » Needs review
FileSize
1.9 KB

Patch

yched’s picture

Issue summary: View changes
yched’s picture

Issue summary: View changes
jibran’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quick fix

Thanks for the patch and issue.

yched’s picture

Category: Task » Bug report

I changed my my mind and qualified it as a bug in the "Beta phase evaluation" table, but forgot to update the issue metadata accordingly

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 556d680 and pushed to 8.0.x. Thanks!

  • alexpott committed 556d680 on 8.0.x
    Issue #2405127 by yched: Move EntityFormDisplay::_sleep() up to...

Status: Fixed » Closed (fixed)

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