Problem/Motivation
Importing a new registration type lead to error:
The import failed due to the following reasons:
Deleted and replaced configuration entity "core.entity_view_display.registration.online.summary"
Steps to reproduce
Install commerce registration on dev and prod.
Create a registration type on dev.
Export config on dev.
Import config into prod.
Proposed resolution
Don't create summary view mode while importing config, expect config to be complete.
The cause is this code:
function commerce_registration_entity_insert(EntityInterface $entity) {
if ($entity instanceof RegistrationTypeInterface) {
if (EntityViewMode::load('registration.summary')) {
// Create a summary view for new registration types.
$display = EntityViewDisplay::create([
Use \Drupal::service('config.installer')->isSyncing() to avoid creating config while syncing.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork commerce_registration-3377542
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 #3
jonathanshawComment #4
john.oltman commentedThanks for the catch @jonathanshaw. I should have this reviewed and merged within a day or so.
Comment #6
john.oltman commentedComment #7
john.oltman commentedCommitted to dev branch, will do a new release next week.