This is exactly the similar bug for 2.0 version on lines of https://www.drupal.org/project/jsonapi_file/issues/2980653 .

While creating the new content it gives ERROR 500 but also creates the content.

CommentFileSizeAuthor
#2 skip-entity-null_v2-0_3019329-1.patch811 bytesnpralhad

Comments

npralhad created an issue. See original summary.

npralhad’s picture

wim leers’s picture

Priority: Critical » Normal
Status: Patch (to be ported) » Postponed (maintainer needs more info)
Issue tags: -jsonapi +API-First Initiative, +Entity Field API
Related issues: +#3014380: EntityReference base fields that are optional are not empty, but its sole item is empty, causing EntityReferenceFieldNormalizer to fail

This sounds like it's exactly the same as #3014380: EntityReference base fields that are optional are not empty, but its sole item is empty, causing EntityReferenceFieldNormalizer to fail.

Can you please confirm that in your case, you're also using an optional entity reference base field? Please apply either the patch there or update to 8.x-2.x HEAD.

wim leers’s picture

Linking the issue mentioned in the original report.

wim leers’s picture

Category: Bug report » Support request
wim leers’s picture

This still needs steps to reproduce.

BTW, it's not cool to cross-post a patch from here to #3014380-35: EntityReference base fields that are optional are not empty, but its sole item is empty, causing EntityReferenceFieldNormalizer to fail without explaining why, especially since that issue is already fixed.

wim leers’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing because >2 weeks without providing steps to reproduce. Feel free to reopen when you have steps to reproduce!