- Issue created by @omarlopesino
- Merge request !19Issue #3463035: Return null when entity type is not found → (Open) created by omarlopesino
- Status changed to Needs review
6 months ago 7:58am 22 July 2024
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.
- Configure an external entity.
- Configure layout builder
- Configure extra field
- Install the site from configuration.
Then the error should appear.
At the getEntityBundleType method, if there is a PluginNotFoundException, return NULL.
Needs review
2.0
Code