LengthException: Impossible to apply defaults on a related resource with heterogeneous resource types. Drupal\jsonapi_defaults\Controller\EntityResource::correctResourceTypeOnRelated() (line 172 of /app/docroot/modules/contrib/jsonapi_extras/modules/json

Created on 29 May 2023, over 1 year ago
Updated 2 June 2024, 7 months ago

Problem/Motivation

I have been facing the following issue while working with JSON_API.

LengthException: Impossible to apply defaults on a related resource with heterogeneous resource types.
Drupal\jsonapi_defaults\Controller\EntityResource::correctResourceTypeOnRelated() (line 172 of /app/docroot/modules/contrib/jsonapi_extras/modules/jsonapi_defaults/src/Controller/EntityResource.php).

Steps to reproduce

Create a taxonomy term with a Content override field type(named: text_override). Add multiple content types in the references.

Add a term in the above-created taxonomy term.

Hit the JSON API with the content override field. Request URI: /jsonapi//field_text_override

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇮🇳India supriya1992

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

Comments & Activities

Production build 0.71.5 2024