Fatal with dynamic_entity_reference

Created on 25 May 2021, over 3 years ago
Updated 13 February 2023, almost 2 years ago

Fatals when viewing or exploring the spec at admin/config/services/openapi when there is a base field using dynamic_entity_reference. Probably because it can't get a resource type from it.

sms.recipient_entity is a base field that is a dynamic_entity_reference field

The website encountered an unexpected error. Please try again later.
Error: Call to a member function getTypeName() on bool in Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator->getEntityResponsesJsonApi() (line 677 of modules/contrib/openapi_jsonapi/src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php).

Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator->getEntityResponsesJsonApi('sms', 'delete', 'sms', 'jsonapi.sms--sms.recipient_entity.relationship.delete', Object) (Line: 240)
Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator->getPaths() (Line: 201)
Drupal\openapi\Plugin\openapi\OpenApiGeneratorBase->getSpecification() (Line: 39)
Drupal\openapi\Controller\ApiSpecificationController->getSpecification(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 706)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
πŸ› Bug report
Status

Postponed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States djdevin Philadelphia

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