Status report says entity type needs to be installed

Created on 23 July 2024, 6 months ago
Updated 29 August 2024, 4 months ago

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.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024