Error "Cannot change the field type" caused by the presence of the module.

Created on 6 October 2024, about 2 months ago

Problem/Motivation

When trying to migrate a Drupal 7 site to a Drupal 10 site prepared with all the modules containing upgrade paths (including Media Migration) the following error is generated:

[error] Cannot change the field type for an existing field storage. The field storage node.field_image has the type image. (/home/drupal/dev/tcc-ds/web/core/modules/field/src/Entity/FieldStorageConfig.php:399)

Steps to reproduce

  • Install a fresh Drupal 7 references site
  • Create a simple content type containing an image field;
  • Create some instances of the newly created content type
  • Try to migrate the Drupal 7 site to a Drupal 10 site having the Media Migration 8.x-1.0-alpha16 module installed

The same error will be generated again.

Uninstalling this module solves the problem and the migration works: the newly created content type and its instances are migrated to the Drupal 10 site.

Proposed resolution

Remaining tasks

API changes

🐛 Bug report
Status

Active

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024