I installed the module manually and added the `Smart Range Field` field in my dev environment and it worked fine as expected then i tried to export the config from `admin/config/development/configuration/single/export` the files and its storage ex: (field.field.node.event.field_date.yml, field.storage.node.field_date) and added it as inside `test_module`module install folder and run it as part of unit testing ex : php ./core/scripts/run-tests.sh --verbose --suppress-deprecations --color --url 'http://local.com' --php "$(which php)" --class 'Drupal\Tests\test_module\Functional\Sampletest' it comes up with couple of schema errors
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for
field.field.node.event.field_date with the following errors:
field.field.node.event.field_date:default_value.0.default_date_type
missing schema,
field.field.node.event.field_date:default_value.0.default_date
missing schema
When export the view modes and added it as part of install folder then i comes with error like.
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for
core.entity_view_display.node.event.event with the following errors:
core.entity_view_display.node.event.event:content.field_date.settings.format
missing schema
So i believe this has to done with the schema setup.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | smart_date-schema-error-on-unit-test-install-3070723-8.patch | 1.9 KB | mandclu |
Comments
Comment #2
santhosh.fernando commentedComment #3
mandclu commentedCan you post the exported config?
Comment #4
santhosh.fernando commentedThis is a example of the file used to export the configs..
Fine Name: "field.field.node.testing_content_type.field_smart_date.yml"
The view display file `core.entity_view_display.node.testing_content_type.default.yml`
I tested the logic with 'strictConfigSchema` is FALSE by default refer:Reference and it worked as expected so i believe this is something with the schema.
Comment #5
santhosh.fernando commentedI have update the schema `smart_date.schema.yml` to the following and it worked for me and i tested the same in unit test as well. Somebody can take a look at the same.
Comment #6
mandclu commentedAwesome, thanks for your work on this. Could you roll a patch?
Comment #7
santhosh.fernando commented@mandclu due our policy we cant create a patch, It will be really helpful if somebody create a patch for this.
Comment #8
mandclu commentedA patch is attached. If you can verify that it resolves the issue, I'll commit it.
Comment #9
santhosh.fernando commented@mandclu that works as expected.. Thank you...
Comment #11
mandclu commentedThanks for your review, merging this in.