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.
I get this error when enabling Debut Article:
FieldException: Cannot change an existing field's type. in field_update_field() (line 231 of /home/dre2phresh/Sites/www/phreshr.tv/modules/field/field.crud.inc).
Comments
Comment #1
nedjoThis is probably because you have an existing field of the same name as one of the fields installed by debut_article.
If you delete that field before enabling debut_article, the error should disappear. Of course, you may want to keep the field.
Comment #2
dre2phresh CreditAttribution: dre2phresh commentedI haven't created any fields. This is on a new install.
Comment #3
nedjoYep, it's confusing and we need to put some documentation in place. Did you install a new install with the standard profile selected? If so, Drupal core will have created fields, including field_image, that conflict with Debut Article.
To fix this, do one of the following:
Comment #4
dre2phresh CreditAttribution: dre2phresh commentedOkay, I see thanks!
Comment #5
janeks CreditAttribution: janeks commentedHow to fix if the Open Outreach distribution install is not suitable for me?
Comment #6
nedjoSee my response in #3, which gives two other approaches you could take. Please let me know if more detail is needed.
Comment #7
andros CreditAttribution: andros commented"(line 231 of /home/dre2phresh/Sites/www/phreshr.tv/modules/field/field.crud.inc)." why is "Sites" capitalized? it should be "sites" instead
Comment #8
dre2phresh CreditAttribution: dre2phresh commentedWhy does it matter? It's capitalized because it is my home folder on my ubuntu desktop development server. That's not an issue!
Comment #9
nedjoThis bug can be fixed following an approach used in media_gallery.install, which detects existing fields and throws a hook_requirements() error if there's an existing field with the same name but a different type. Arguably this should go in features, but a workaround in debut_article and other debut features meanwhile is important.
Comment #10
kingfisher64 CreditAttribution: kingfisher64 commentedWould deleting the article content type and then re-creating it with different field names eg, (article_image, article_body, article_tags) etc work?
Comment #11
nedjoResolved this by changing the name of the field we create (and converting its type from media to image).