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.

Command icon 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

jonathanshaw created an issue. See original summary.

jonathanshaw’s picture

Issue summary: View changes
Status: Active » Needs review
john.oltman’s picture

Thanks for the catch @jonathanshaw. I should have this reviewed and merged within a day or so.

john.oltman’s picture

Status: Needs review » Fixed
john.oltman’s picture

Committed to dev branch, will do a new release next week.

Status: Fixed » Closed (fixed)

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