Improve support when JSON schema reference is incorrect

Created on 14 October 2022, over 1 year ago
Updated 18 June 2024, 11 days ago

Problem/Motivation

There's a scenario in which the following error occurs when adding a new patterkit block.

TypeError: array_diff(): Argument #1 ($array) must be of type array, null given in array_diff() (line 255 of modules/contrib/patternkit/src/Asset/PatternDependencyResolver.php).

Steps to reproduce

  1. Introduce a typo within a $ref value of a nested pattern, e.g. within example_ref.json here
  2. Enable patternkit_example module and its dependencies
  3. Go to /patternkit_block/add
  4. Click "Example with Reference"
  5. Give a block description
  6. Click Save
  7. Observe error

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

✨ Feature request
Status

Postponed

Version

9.1

Component

Module Core

Created by

πŸ‡ΊπŸ‡ΈUnited States jasonawant New Orleans, USA

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.

  • πŸ‡ΊπŸ‡ΈUnited States slucero Arkansas

    I'm updating the title for more clarity, and I'm changing this to a feature request to improve support of this scenario. I wouldn't necessarily call it a bug since the content in the schema is incorrect, but we can add support to make it more clear what the issue is and how to resolve it.

    Confirmed this still occurs in the latest dev release after the the Beta 7 release.

  • Status changed to Postponed 11 days ago
  • πŸ‡ΊπŸ‡ΈUnited States slucero Arkansas
Production build 0.69.0 2024