Multiple entities error on creation with REST

Created on 9 April 2021, over 4 years ago
Updated 21 July 2025, 26 days ago

Problem/Motivation

If more than 1 entity is created an error is thrown when creating programmatically an entity, for example with REST

Steps to reproduce

Create more than 1 entity type, enable the REST service for at least one entity and try to create one.
The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Core\Entity\Exception\AmbiguousEntityClassException</em>: Multiple entity types found for Drupal\eck\Entity\EckEntity. in <em class="placeholder">Drupal\Core\Entity\EntityTypeRepository-&gt;getEntityTypeFromClass()</em> (line <em class="placeholder">87</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/EntityTypeRepository.php</em>).

This was already discussed here https://www.drupal.org/project/eck/issues/3052282 β†’ but using current dev the issue is still there.
tx
Simone

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain cimo75

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024