Problem/Motivation

Adding or removing fields to an entity type buyndle, i.e. node--content type does not update jsonapi_extras.jsonapi_resource_config.{type}--{bundle}.yml config.

Steps to reproduce

1) Set "Disable by default" in JSON:API extras config
2) Set "Validate config integrity" in JSON:API extras config
3) Configure a node bundle to be enabled
4) Add a field to the node bundle
5) Export config

When attempting to re-import config you should get the following config sync error:
" There were errors validating the config synchronization. Integrity check failed for the JSON:API Extras configuration. There is no configuration set for the field "field_name" on the resource "node--{bundle}". To fix this, disable the configuration integrity check (in the JSON:API Extras settings page), so you can import these fields locally. After that configure and re-save this resource type in the JSON:API Extras configuration page . Finally, re-enable the configuration integrity checks and export the configuration again."

jsonapi_extras.jsonapi_resource_config.{type}--{bundle} has a config dependency set on the entity type bundle, but does not update when that bundle changes, unless you manually save the config.

Proposed resolution

When fields are modified on the entity type bundle, jsonapi_extras.jsonapi_resource_config.{type}--{bundle} should update as well.

Comments

adam-delaney created an issue. See original summary.

adam-delaney’s picture

joachim’s picture

Priority: Normal » Major

It's related to that issue, not sure it's exactly the same fix.

I think this is a major -- it causes a crash when you import config if you didn't remember to update the resource config to get the new field.