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.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Toggle MR activity (3 comments)

RyanCMcConnell created an issue. See original summary.

guypaddock’s picture

Title: When importing a jsonapi_extras config file with the config_sync module installed, it throws an error: "Undefined index: label in Drupal\config_sync\ConfigSyncLister->getExtensionChangelist()" » JsonapiResourceConfig Declares a `label` Entity Key that It Does Not Use or Maintain
Assigned: Unassigned » guypaddock

Issue #3265286: JsonapiResourceConfig Declares a `label` Entity Key that It Does Not Use or Maintain
guypaddock’s picture

Version: 8.x-3.20 » 8.x-3.x-dev
guypaddock’s picture

Assigned: guypaddock » Unassigned
Status: Active » Needs review

Test failures are unrelated. Ready for review!

bbrala made their first commit to this issue’s fork.

bbrala’s picture

Good catch, thank you, sorry for the delay :x

bbrala’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.