Add NotBlankAfterInstall constraint and use it for system.date:timezone.default

Created on 15 July 2024, 9 months ago

Problem/Motivation

We made system.date:timezone.default nullable in πŸ“Œ Add validation constraints to system.date Fixed but a NULL is not a valid value once Drupal has been installed. We set the default timezone in the installer.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 14 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @alexpott
  • Status changed to Needs review 9 months ago
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ
  • Pipeline finished with Canceled
    9 months ago
    Total: 171s
    #224639
  • Pipeline finished with Failed
    9 months ago
    Total: 463s
    #224644
  • Pipeline finished with Failed
    9 months ago
    Total: 463s
    #224692
  • Pipeline finished with Failed
    9 months ago
    Total: 572s
    #224750
  • Status changed to Needs work 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Seems there may be other config that needs updating

    Drupal\Tests\system\Functional\Datetime\DrupalDateTimeTest::testDateTimezone
        Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for
        system.date with the following errors: 0 [timezone.default] This value
        should not be null.
    
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    Hmm, no relations, setting a parent so it doesn't disappear. Seems rather usefull and quite isolated to implement.

  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    And a quick rebase.

  • Pipeline finished with Failed
    9 days ago
    Total: 664s
    #468518
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    Fun, when looking at the tests, (core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php:44) it sets an empty timezone as default. But that it not really allowed, or at least, possible through the interface.

    So the test starts in a state which is not allowed. That is weird. Looking at the form, it would never happen, and if it was empty it would be the system default. Should that line be set to a default? Should we disable config validation there? Not sure.

  • Pipeline finished with Failed
    8 days ago
    Total: 589s
    #468586
  • Pipeline finished with Failed
    6 days ago
    Total: 1103s
    #471233
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    Well, this is fun. There is quite a few ways to install config in tests, and a lot of times it installs the config as is default. This means without a value here. While installing only really checks when a install is ran, but not really if a module is being installed.

    Not sure how we can do this, i mean, we would like to validate config that is being installed right? So its mostly something during testing, But not sure how to get to the end here.

Production build 0.71.5 2024