Problem/Motivation

After updating to CE 3.x from an older version, Drupal's status report says

The Entity custom element display entity type needs to be installed.

Proposed resolution

Install entity type in an update hook.

As an aside

Things work fine without this; the actual entity definition used by running Drupal code is available from EntityTypeManager::getDefinition('entity_ce_display'), even if not from the EntityDefinitionUpdateManager / EntityLastInstalledSchemaRepository.

I still find this EntityDefinitionUpdateManager (or more accurate: EntityTypeListener / EntityLastInstalledSchemaRepository) code hard to understand. I'm guessing it's there to be able to override "additional actions that are done during entity/field installs" but isn't super important for actual operation of the site.
(Or maybe the EntityDefinitionUpdateManager is responsible for adding a cached version of the EntityTypeManager::getDefinition()? I don't know...)

I can't find a blog post or docs that really sheds light on this (and I tend to try and write those myself in that case, but that takes me days of digging through issues...)

So... this MR is just (modified) code found in a google search... and that'll have to be it.

I'll set it to review, but merge it whenever I merge other reviewed things.

Command icon 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

roderik created an issue. See original summary.

roderik’s picture

Issue summary: View changes

roderik’s picture

Status: Active » Needs review
useernamee’s picture

Tested changes on one of our environments with this error in status report and it fixed the issue. RTBC.

useernamee’s picture

Status: Needs review » Reviewed & tested by the community

  • roderik committed ad34c92d on 3.x
    Issue #3463334 by roderik, useernamee: Status report says entity type...
roderik’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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