Invalid output JSON schema in UrlLinkEnhancer

Created on 10 September 2021, over 3 years ago
Updated 6 September 2023, over 1 year ago

Problem/Motivation

If link's options contain nested arrays, doUndoTransform() fails with following error.
TypeError: Adaptor Drupal\jsonapi_extras\Plugin\ResourceFieldEnhancerBase returned invalid output data: [] funktsioonist Drupal\jsonapi_extras\Plugin\ResourceFieldEnhancerBase->undoTransform() (real 66 failis /var/www/html/vendor/e0ipso/shaper/src/DataAdaptor/DataAdaptorTransformerTrait.php)

Proposed resolution

It seems that changing "options" type from "array" to "object" helps.

I'll see if I can manage writing a test.

๐Ÿ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

๐Ÿ‡ช๐Ÿ‡ชEstonia luuph

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