Problem/Motivation
Smart Date replaces the core Views date argument plugin with its own Date plugin (Drupal\smart_date\Plugin\views\argument\Date), which adds two additional options: format and granularity. However, the config schema for views.argument.date does not include these keys.
This causes ConfigSchemaChecker errors during recipe application or config import when a Views config includes a date argument that uses these options:
Schema errors for views.view.my_schedule with the following errors:
views.view.my_schedule:display.attachment_1.display_options.arguments.field_when_value.format missing schema
views.view.my_schedule:display.attachment_1.display_options.arguments.field_when_value.granularity missing schema
Proposed resolution
Implement hook_config_schema_info_alter() in a SmartDateHooks class to dynamically add the date_token, format, and granularity keys to the views.argument.date schema definition. This mirrors the existing approach already used for views.filter_value.date granularity.
The hook class follows the Drupal 11 OOP hook pattern, with the procedural smart_date_config_schema_info_alter() function in smart_date.module retained and marked #[LegacyHook] for backwards compatibility.
Issue fork smart_date-3604092
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
mandclu commented