- Issue created by @qiutuo
- Merge request !13193Issue #3545295: Entity created using POST in RESTful entity type in ECK module. → (Open) created by Unnamed author
The entity types created using modules like ECK report this error because multiple entity types use the same class file, while the Jsonapi module does not have this error.
Drupal\Core\Entity\Exception\AmbiguousEntityClassException:Drupal\Core\Entity\EntityTypeRepository->getEntityTypeFromClass() in Multiple entity types found for Drupal\eck\Entity\EckEntity. (/www/wwwroot/web/core/lib/Drupal/Core/Entity/EntityTypeRepository.php The 83rd line).
#0 /www/wwwroot/web/core/modules/serialization/src/Normalizer/FieldableEntityNormalizerTrait.php(54): Drupal\Core\Entity\EntityTypeRepository->getEntityTypeFromClass()
#1 /www/wwwroot/web/core/modules/serialization/src/Normalizer/EntityNormalizer.php(39): Drupal\serialization\Normalizer\EntityNormalizer->determineEntityTypeId()
#2 /www/wwwroot/vendor/symfony/serializer/Serializer.php(240): Drupal\serialization\Normalizer\EntityNormalizer->denormalize()
#3 /www/wwwroot/web/core/modules/rest/src/RequestHandler.php(179): Symfony\Component\Serializer\Serializer->denormalize()
#4 /www/wwwroot/web/core/modules/rest/src/RequestHandler.php(67): Drupal\rest\RequestHandler->deserialize()
#5 [internal function]: Drupal\rest\RequestHandler->handle()
#6 /www/wwwroot/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#7 /www/wwwroot/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}()
#8 /www/wwwroot/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
Active
11.2 🔥
rest.module