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)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dudleyc created an issue. See original summary.

TR’s picture

Status: Active » Needs review
FileSize
1.31 KB

Yeah, it's kind of ridiculous that this was never done. Here's a patch.

Status: Needs review » Needs work

The last submitted patch, 2: 2851291-2-field-schema.patch, failed testing. View results

TR’s picture

Status: Needs work » Needs review
TR’s picture

Note 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.

Status: Needs review » Needs work

The last submitted patch, 5: 2851291-5-field-schema.patch, failed testing. View results

TR’s picture

Status: Needs work » Needs review
TR’s picture

One more addition. Configuration inspector reports all good now.

Status: Needs review » Needs work

The last submitted patch, 8: 2851291-8-field-schema.patch, failed testing. View results

TR’s picture

Status: Needs work » Needs review

  • TR committed 976ec06 on 8.x-1.x
    Issue #2851291 by TR: Missing configuration schema for fivestar field,...
TR’s picture

Status: Needs review » Fixed

I 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.