JsonapiResourceConfig Declares a `label` Entity Key that It Does Not Use or Maintain

Created on 18 February 2022, over 2 years ago
Updated 7 June 2024, 21 days ago

Problem/Motivation

When I import or revert a jsonapi_resources config in an update hook (let's call it jsonapi_extras.jsonapi_resource_config.paragraph--example.yml), I get the following error: Undefined index: label in Drupal\config_sync\ConfigSyncLister->getExtensionChangelist().

Stack trace shows that the the jsonapi_resources config type specifies that a label exists, but this is untrue for jsonapi_extras configs, which only have an ID.

Steps to reproduce

  1. Install Config Sync module.
  2. Install Jsonapi Extras and Jsonapi Resources modules.
  3. Create an override in Jsonapi Extras.
  4. Export the resulting config file.
  5. Make a change to the config file and add it to a new module.
  6. Create an update hook that imports or reverts the config.
  7. Run this update hook using Devel PHP execute.

Proposed resolution

Either add a label to the config or make sure that the jsonapi_resources config type no longer expects a label.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States RyanCMcConnell

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.69.0 2024