Problem/Motivation

With the config schema validator service enabled (eg. in a local development environment), enabling the module yields an error:
Schema errors for node_read_time.settings with the following errors: node_read_time.settings:reading_time missing schema
By only fixing this, we'll get 2 other errors:

Schema errors for node_read_time.settings with the following errors: node_read_time.settings:reading_time.container missing schema, node_read_time.settings:reading_time.words_per_minute variable type is string but
   applied schema class is Drupal\Core\TypedData\Plugin\DataType\IntegerData

Steps to reproduce

See above.

Proposed resolution

Fix the config schema.

Remaining tasks

Review, commit, release.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

attila.fekete created an issue. See original summary.

attila.fekete’s picture

Title: Fix config schema error » Fix config schema errors
Issue summary: View changes
attila.fekete’s picture

StatusFileSize
new860 bytes
attila.fekete’s picture

StatusFileSize
new2.28 KB

Ignore patch #3, this needed more changes.

Since the schema was incorrect, $form_state->getValues() (inside submitForm()) was saving unneeded form array data like form_build_id, form_token, form_id, etc. which we shouldn't store in the configuration.

Patch #4 also fixes this.

attila.fekete’s picture

Status: Active » Needs review
StatusFileSize
new2.28 KB

Accidentally uploaded patch #4 twice.

attila.fekete’s picture

morvaim’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

yivanov’s picture

Thanks for the fix! Do you consider it as a breaking change for old installations of the module as the schema is different? Perhaps it needs update hook as well?

  • attila.fekete authored 1a29495 on 8.x-1.x
    Issue #3248670 by attila.fekete: Fix config schema errors
    
yivanov’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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