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.
Getting the following error on install:
FieldException: Cannot change an existing field's type. in field_update_field() (Line 234 in /srv/www/vhosts/.../htdocs/modules/field/field.crud.inc).
Comments
Comment #1
kreynen CreditAttribution: kreynen commentedI will update this soon. The issue is that you already have a field with the same name as the one of the fields defined in the Feature part of this module. The fields are currently named...
field_sub_head
field_slideshow_image
field_weight
I'm adjusting these field names to...
field_cm_sub_head
field_cm_slideshow_image
field_cm_weight
Comment #2
kreynen CreditAttribution: kreynen commentedComment #3
one2gov CreditAttribution: one2gov commentedChange this line (234) with:
if ( ! array_key_exists('distribution_name', $info)) $info['distribution_name'] = 'Drupal';
return $info['distribution_name'];
also working with a few more similar fieldException
Comment #4
serg2 CreditAttribution: serg2 commentedI receive this error when enabling "Isotope Example 7.x-2.x-dev". Once enabling the module the only way to remove the error is to delete the module.
Line 233 & 234 of field.crud.inc is:
Should I replace 233 & 234 with :
Comment #5
kreynen CreditAttribution: kreynen commentedThe original version of cm_slideshow used a Feature to create it's fields. isotope_example is still an exported Feature and will remain that way, but cm_slideshow has been changed. If you try to enable a Feature and it attempts to create a field that already exists, you get this error. This is an issue for the Features module, not modules that include a Feature.
This type of issue has always been a problem for Features. Unlike module development where the developer should prefix any fields they create based on with the Drupal.org project name, you can call a Feature anything. When the first Features developed, several were called image_gallery with a field called image_field. Even if the image galleries used a different name for their Features like devseed_image_gallery and pingv_image_gallery, if they both use image_field you'll get this error.
Sorry, but there is not much that can be done about this at the module level.
Comment #6
serg2 CreditAttribution: serg2 commentedThank you for the explanation