Problem/Motivation

We need to create a schema for the micon_link widget settings. Furthermore, we found out, that the schema tests in #3428592: Micon missing schema for its fields definitions don't suffice and that the schema is still broken for the main module's widget definition.

Meaning, we need to also adjust those.

Steps to reproduce

Proposed resolution

Fix the stated problems.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork micon-3444371

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

Grevil created an issue. See original summary.

grevil’s picture

Title: Create a schema for micon_link widget and fix schema for micon. » Fix / Create schema definitions and appropriate tests for all (sub)modules

grevil’s picture

Assigned: Unassigned » anybody

Alright, these are quite a big chunk of changes, but this will ensure the module's formatter / widget settings schema to be valid at all times.

Please review! I still need to test the update hooks, but they should work. We updated formatter settings similar in photoswipe before.

Happy reviewing!

grevil’s picture

Status: Active » Needs review
grevil’s picture

Assigned: anybody » Unassigned
Status: Needs review » Needs work

All update hooks work as expected!

Interestingly enough, I found a bug in config inspector. The config inspector still shows schema errors for the icon widget "packages" setting, even after resaving the widget settings / creating a new field and adjusting the widget settings. This doesn't make sense as

1. The new tests do NOT throw schema errors anymore after the new schema update.
2. We are using the EXACT SAME "packages" setting for a widget in our "micon_link" submodule with the EXACT SAME schema, but there we do not get any schema errors from config inspector
3. The same checkboxes form element + schema combination is used in the "book" core module. See here and here.

I think it might have something to do with the name of the formatter.

grevil’s picture

Status: Needs work » Needs review

Ok, that is fascinating. It really is the name! If we change the name of the widget, all schema errors are gone!

I think this is related to the fact, that the widget has the same id as the field_type AND the formatter. And somehow Drupal core's schema validation works as intended, but the config inspector UI doesn't.

I'll create a follow-up issue for that and a config_inspector bug report.

anybody’s picture

Assigned: Unassigned » grevil
Status: Needs review » Needs work

Whao lots of important bug fixes. Hope it all goes well ;)

Just left once textual comment. RTBC afterwards.

  • Grevil committed 9e5407a0 on 2.x
    Issue #3444371: Fix / Create schema definitions and appropriate tests...
grevil’s picture

Assigned: grevil » Unassigned
Status: Needs work » Reviewed & tested by the community
grevil’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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