After installing this module, when viewing certain config or importing config or clearing caches, a warning is displayed:
Array to string conversion ConfigUuidRemapper.php:43

This appears to be specifically related to jsonapi_extras module, where the jsonapi_extras.jsonapi_resource_config.* config has plugins, which may include 'id' as an array of values, and not actually the id of the config/plugin.
After saving that config with this module enabled, there are 500 errors on Json:Api routes:

TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in array_filter() (line 116 of /code/web/modules/contrib/jsonapi_extras/src/ResourceType/ConfigurableResourceType.php).

As this module assumes the id is a string, I've included a patch to explicitly check for that. With this patch applied, and after re-saving the affected configuration, I'm no longer experiencing either warning or error.

CommentFileSizeAuthor
array_to_string_conversion.patch851 byteslisagodare

Comments

lisagodare created an issue. See original summary.

lisagodare’s picture

Issue summary: View changes
lisagodare’s picture

Here's an excerpt of our jsonapi_extras.jsonapi_resource_config.block-content--basic.yml. The same pattern applies to the contrib content entity type "storage" from the Storage Entities module.

Nodes (e.g. jsonapi_extras.jsonapi_resource_config.node--page.yml), and other content types that do not use 'id' (nid, tid, etc) as the Id field, are not affected.

langcode: en
status: true
dependencies:
  config:
    - block_content.type.basic
id: block_content--basic
disabled: true
path: block_content/basic
resourceType: block_content--basic
resourceFields:
  id:
    disabled: false
    fieldName: id
    publicName: id
    enhancer:
      id: ''
...