Error in site install from configuration: The "??" entity type does not exist.

Created on 22 July 2024, 6 months ago

Problem/Motivation

When the site is being installed from configuration, the following error appears:


Drupal\Component\Plugin\Exception\PluginNotFoundException: The "???" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of /var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php). 

  In SqlContentEntityStorage.php line 817:
                                                   
    The "???" entity type does not exist.  
                                                   
  
  In EntityTypeManager.php line 139:
                                                   
    The "???" entity type does not exist. 

The backtrace is:

#0 /var/www/html/web/modules/contrib/extra_field/src/Plugin/ExtraFieldManagerBase.php(232): Drupal\Core\Entity\EntityTypeManager->getDefinition('??')
#1 /var/www/html/web/modules/contrib/extra_field/src/Plugin/ExtraFieldManagerBase.php(155): Drupal\extra_field\Plugin\ExtraFieldManagerBase->getEntityBundleType('??')
#2 /var/www/html/web/modules/contrib/extra_field/src/Plugin/ExtraFieldManagerBase.php(124): Drupal\extra_field\Plugin\ExtraFieldManagerBase->allEntityBundles('??')
#3 /var/www/html/web/modules/contrib/extra_field/src/Plugin/ExtraFieldManagerBase.php(99): Drupal\extra_field\Plugin\ExtraFieldManagerBase->makeEntityBundlePairs('??', '*')
#4 /var/www/html/web/modules/contrib/extra_field/src/Plugin/ExtraFieldDisplayManager.php(81): Drupal\extra_field\Plugin\ExtraFieldManagerBase->supportedEntityBundles(Array)
#5 /var/www/html/web/modules/contrib/extra_field/extra_field.module(18): Drupal\extra_field\Plugin\ExtraFieldDisplayManager->fieldInfo()

It happens in a site that has the external entities module, and configuring layout builder in any content type.

Steps to reproduce

- Configure an external entity.
- Configure layout builder
- Configure extra field
- Install the site from configuration.

Then the error should appear.

Proposed resolution

At the getEntityBundleType method, if there is a PluginNotFoundException, return NULL.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇪🇸Spain omarlopesino

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