Problem/Motivation
config_log 4.0.x declared two new settings (leading_context_lines and trailing_context_lines, added by drupal.org/project/config_log/issues/3525969) with `type: number`. `number` is not a defined Drupal core config schema primitive, so the strict ConfigSchemaChecker used by every Functional / BrowserTestBase run throws SchemaIncompleteException as soon as config_log is installed:
Drupal\Core\Config\Schema\SchemaIncompleteException:
Proposed resolution
In config_log.schema.yml, change leading_context_lines and trailing_context_lines to specify a type of integer, not number.
Issue fork config_log-3606794
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
Comment #4
dkmishra commentedComment #5
nagy.balint commentedThank you for the report!
I think however that that langcode is not needed there, as it is likely inherited from core already.
Comment #6
dkmishra commentedHi @nagy.balint, thanks for the feedback. Do you mean the explicit langcode mapping in config/schema/config_log.schema.yml, or the langcode: en value in config/install/config_log.settings.yml / the update hook?
Comment #7
nagy.balint commentedI mean if I'm right that langcode is inherited, then we dont need to add it anywhere since the schema will be handled by core.
Comment #8
dkmishra commentedThanks, you’re right that the langcode schema mapping is inherited from core via type: config_object, so I removed the langcode entry from config/schema/config_log.schema.yml. Please review.
Comment #9
ebeyrent commentedTested and deployed, no issues.
Comment #10
nagy.balint commentedSorry but I still see langcode in the diff, while if it's inherited it should not be in the patch at all.
Comment #11
dkmishra commentedHi @nagy.balint Thanks for the review.
I agree that langcode should not be declared explicitly in the schema because it is inherited from config_object, and I've already removed that part.
However, I also tested removing
langcode: enfromconfig/install/config_log.settings.yml. After doing so,drush config:inspect --detail --only-errorreports:This suggests that while the schema inherits langcode, the configuration object itself still requires a langcode value. For that reason, I believe keeping langcode: en in the install configuration (and adding it for existing installations via the update hook) is the correct approach.
Could you please verify this on your side as well? If I'm overlooking something, I'd be happy to update the patch accordingly.
Comment #12
nagy.balint commentedUpon further review, I think you are right!
It has to remain in install.
Of course it would have been better with a single update hook, especially as the 8003 saves unconditionally, but its a minor thing.
Comment #14
nagy.balint commentedThank you!