Problem/Motivation

This module's configuration schema definition is missing configuration for business_rules.settings. As a result, if you try to install the module as part of an automated test, you get the following error:

Drupal\Core\Config\Schema\SchemaIncompleteException: No schema for business_rules.settings

Also, there are some files which are incorrectly and inconsistently named:

  1. business_rules.setting.yml should be business_rules.settings.yml
  2. business_rule.schema.yml should be business_rules.schema.yml

Finally, there is a spelling mistake in the key bolean in business_rules_variable.schema.yml under business_rules.variable.type.view_result_variable.

Proposed resolution

  • Rename business_rules.setting.yml to business_rules.settings.yml
  • Rename business_rule.schema.yml to business_rules.schema.yml
  • Add a schema for business_rules.settings in business_rules.settings.yml
  • Fix the spelling mistake in business_rules_variable.schema.yml

Remaining tasks

  1. Write a patch
  2. Review and feedback
  3. RTBC and feedback
  4. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

Documentation links

  1. Documentation -> Drupal -> Drupal APIs -> Configuration API -> Configuration schema/metadata
  2. Drupal core Change records -> Configuration schema for field settings, default values and entity view/form displays changed

Comments

Brolad created an issue. See original summary.

brolad’s picture

StatusFileSize
new1.2 KB
Oscaner’s picture

StatusFileSize
new1.62 KB
new764 bytes

In 8.x-1.0 version, it's business_rules.setting. So i added it too.

Oscaner’s picture

StatusFileSize
new2.38 KB
new781 bytes

So interesting, why missing schema so much?

brolad’s picture

I guess config/install/business_rules.setting.yml should be renamed to config/install/business_rules.settings.yml .

weynhamz’s picture

@Kang Miao, the schema for `business_rules.action.type.loop_through_multivalued_variable` should be added to patch in #3087857: Add more general action to loop through a multivalued variable

Oscaner’s picture

@weynhamz Thanks for reminding me, i will move the schema into #3087857

Oscaner’s picture

StatusFileSize
new1.91 KB
new1.74 KB

Update patch with #5 & #6 comments.

mparker17’s picture

Issue summary: View changes
StatusFileSize
new3.64 KB
new1.59 KB

Here's an updated patch that:

1. renames config/install/business_rules.setting.yml to config/install/business_rules.settings.yml as per @brolad's request in #5
2. Adds a test to see if the module correctly installs... if it does, then (among other things) there shouldn't be any config schema issues in the default settings

I also updated the issue summary.

Reviews are welcome!

mparker17’s picture

Title: Missing schema » Missing business_rules.settings schema, invalid 'bolean' type, inconsistent filenames

Updated the issue title

mparker17’s picture

Issue summary: View changes

Added links to the documentation I was reading when I was trying to write the patch.

mparker17’s picture

Issue summary: View changes
colan’s picture

Version: 8.x-1.x-dev » 2.x-dev

  • colan committed bec01f4 on 2.x authored by Brolad
    Issue #3133400 by Oscaner, mparker17, Brolad: Fixed missing...
colan’s picture

Status: Needs review » Fixed

Thanks all!

Status: Fixed » Closed (fixed)

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