Schema error for override_node_options.settings

Created on 14 August 2020, almost 4 years ago
Updated 2 February 2023, over 1 year ago

Problem/Motivation

Schema error if the schema checker service is enabled:
`Schema errors for override_node_options.settings with the following errors: override_node_options.settings:general_permissions variable type is integer but applied schema class is Drupal\Core\TypedData\Plugin\DataType\BooleanData, override_node_options.settings:specific_permissions variable type is integer but applied schema class is Drupal\Core\TypedData\Plugin\DataType\BooleanData`

According to the schema 'general_permissions' and 'specific_permissions' have
boolean type but the module saves integer value to the config.

Proposed resolution

Typecast the value that comes from the form to boolean.

πŸ› Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

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.

  • Status changed to RTBC over 1 year ago
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    As this is the schema:

    override_node_options.settings:
      type: config_object
      label: 'Override Node Options settings'
      mapping:
        general_permissions:
          type: boolean
          label: 'Use general permissions.'
        specific_permissions:
          type: boolean
          label: 'Use content type specific permissions.'

    this also looks correct to me. The maintainer may decide to use !empty() instead of (bool).

    So setting this RTBC to fix the issue.

Production build 0.69.0 2024