Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using 8.x-1.x-dev, created fivestar field via UI and then exported the YML, when include that with a custom module that creates a custom content type using a fivestar field it fails installation due to the settings attribute of the fivestar field's storage settings.
This is the exported YML file (minus the uuid):
langcode: en
status: true
dependencies:
module:
- fivestar
- node
id: node.apic_rating
field_name: apic_rating
entity_type: node
type: fivestar
settings:
voting_tag: vote
module: fivestar
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
I also tried replacing settings with
settings: { }
but the error is exactly the same:
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for
field.storage.node.apic_rating with the following errors:
field.storage.node.apic_rating:settings.voting_tag missing schema in
Drupal\Core\Config\Testing\ConfigSchemaChecker->onConfigSave() (line 93
of
/home/travis/build/apimesh/drupal-8/drupal/core/lib/Drupal/Core/Config/Testing/ConfigSchemaChecker.php).
Drupal\Core\Config\Testing\ConfigSchemaChecker->onConfigSave(Object,
'config.save', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('config.save',
Object) (Line: 227)
Drupal\Core\Config\Config->save(1) (Line: 280)
Drupal\Core\Config\Entity\ConfigEntityStorage->doSave('node.apic_rating',
Object) (Line: 392)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 259)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 364)
Drupal\Core\Entity\Entity->save() (Line: 637)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 321)
Drupal\Core\Config\ConfigInstaller->createConfiguration('',
Array) (Line: 125)
Drupal\Core\Config\ConfigInstaller->installDefaultConfig('module',
'devorg') (Line: 75)
Drupal\Core\ProxyClass\Config\ConfigInstaller->installDefaultConfig('module',
'devorg') (Line: 248)
Drupal\Core\Extension\ModuleInstaller->install(Array, 1) (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, 1)
(Line: 893)
Drupal\simpletest\WebTestBase->installModulesFromClassProperty(Object)
(Line: 561)
Drupal\simpletest\WebTestBase->setUp() (Line: 45)
Comment | File | Size | Author |
---|---|---|---|
#8 | 2851291-8-field-schema.patch | 2.13 KB | TR |
#5 | 2851291-5-field-schema.patch | 1.93 KB | TR |
Comments
Comment #2
TR CreditAttribution: TR commentedYeah, it's kind of ridiculous that this was never done. Here's a patch.
Comment #4
TR CreditAttribution: TR commentedComment #5
TR CreditAttribution: TR commentedNote that complete schemas are also need for testing, as DrupalCI performs strict schema checking when running tests. I have been porting the tests to D8 and have found that there are a few other needed schemas.
Here is a new version of the patch which adds additional schemas for the Fivestar field formatters and field widgets, in addition to the schema for the Fivestar field and the Fivestar field storage (the field storage was the subject of the original post).
I think this is complete now.
Comment #7
TR CreditAttribution: TR commentedComment #8
TR CreditAttribution: TR commentedOne more addition. Configuration inspector reports all good now.
Comment #10
TR CreditAttribution: TR commentedComment #12
TR CreditAttribution: TR commentedI have verified that the configuration installed by this module validates against the above schema on a clean site (simplytest.me). If you find any further problems please open a new issue.