Problem/Motivation

The schema form facet hierarchy creates a loop since the hierarchy config in facets.facet.* defines that the hierarchy config key is of type facets.facet.[%parent.type]

The becomes an issue when a module like config_views that parses config schemas is enabled since a loop is created.

Steps to reproduce

Enable facets 2.0.1 and config_views on the same site.

Proposed resolution

Change the schema to define hierarchy type to something that does not create a loop. For example facets.hierarchy.%parent.type]

Issue fork facets-3259836

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

auth created an issue. See original summary.

auth’s picture

Attached is a patch that implements the proposed change

mkalkbrenner’s picture

Version: 2.0.1 » 2.0.x-dev
idebr’s picture

Status: Active » Needs review

Status: Needs review » Needs work
herved’s picture

Version: 2.0.x-dev » 3.0.x-dev

This causes issues with config_inspector which outputs the following when inspecting facet configs:

The LangcodeRequiredIfTranslatableValues constraint can only operate on the root object being validated.

Seems to relate to #3456858: The LangcodeRequiredIfTranslatableValues constraint can only operate on the root object being validated. but the reporter may also be facing another issue (from another module/schema definition).

If I understand correctly FacetsHierarchy plugins are processors which may have configuration (forms).
So the type should be plugin.plugin_configuration.facets_hierarchy.[%parent.type]

I'll create a merge request for 3.x

herved’s picture

Status: Needs work » Needs review
StatusFileSize
new1.12 KB

MR created, here is a static patch which also applies cleanly on 2.0.x

edit: Are tests on 3.0.x currently broken?

herved’s picture

#3459093: Config validation error for facets_processor.* is also related, and also needs to be applied (not released yet)

borisson_ made their first commit to this issue’s fork.

  • borisson_ committed f6ec3c8e on 3.0.x authored by herved
    Issue #3259836 by herved, auth, mkalkbrenner: config schema for...

  • borisson_ committed 297bc08b on 2.0.x
    Issue #3259836 by herved, auth, mkalkbrenner, borisson_: config schema...
borisson_’s picture

Status: Needs review » Fixed

Commited and pushed to both 2.x and 3.x

Status: Fixed » Closed (fixed)

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