Closed (fixed)
Project:
Revision Manager
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2025 at 17:15 UTC
Updated:
25 Dec 2025 at 16:29 UTC
Jump to comment: Most recent
The config schema is incomplete and the existing schema throws errors:
"revision_manager.settings:enabled_entities.node": {
"key": "revision_manager.settings:enabled_entities.node",
"status": "missing schema",
"validatability": null,
"data": null
},
Let's provide a complete schema which passes validation.
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 #3
pfrenssenI updated the schema but it looks like the module is currently not storing the configuration values with correct types. Instead we are passing through whatever we get from the form state. For example the entity type enabled status should be a boolean but is stored as an integer
0or1. Also the values for plugin settings (ageandamount) which are declared as integers are stored as strings.We should make sure the types are correctly cast before storing them, and we probably need to add an update hook to correct the values in existing installations.
Comment #4
pfrenssenOur dynamic use of third party settings doesn't seem to be possible to define in a config schema. The current implementation tries to do it like this:
But this is not correctly parsed by the config schema resolver. But using something like
node.type.*.third_party.revision_managerworks fine.This ticket seems to have been discussion the problem years ago, even before third party settings existed: #2645046: How do you add schema for every config bundle entity type, but it was closed due to lack of movement.
For now, maybe we should just provide the schema for the core entity types that we support?
Comment #5
j-barnes commented@pfrenssen - Thanks for digging into this! The original idea was to keep it dynamic so adding new entity type plugins wouldn't require schema changes, but you're right - it looks like the schema system doesn't support it. Explicit definitions are the way to go for this.
Comment #6
j-barnes commented@pfrenssen - Thanks again for the working on this! I've rebased against 1.0.x and added a few fixes:
All tests pass locally. Could you give it a look?
Comment #7
sunny-lee commentedThis looks good! Tested drush update db and it imported correctly without errors. Checked the functionality of the rest of revision manager - checked age, checked min, checked age + min, checked translations saving multiple, checked forward revisions. Tried on several media types. All looks good here.
Comment #8
j-barnes commentedThanks for the work on this!