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

nedjo’s picture

Category: bug » support

This 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.

dre2phresh’s picture

I haven't created any fields. This is on a new install.

nedjo’s picture

Yep, 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:

  • Download and use the Open Outreach distribution, or
  • Install Drupal using the minimal installation profile, which doesn't install the article content type or the image field, or
  • Use the standard Drupal installation profile but delete the article content type and any other instance of field_image
dre2phresh’s picture

Okay, I see thanks!

janeks’s picture

How to fix if the Open Outreach distribution install is not suitable for me?

nedjo’s picture

See my response in #3, which gives two other approaches you could take. Please let me know if more detail is needed.

andros’s picture

"(line 231 of /home/dre2phresh/Sites/www/phreshr.tv/modules/field/field.crud.inc)." why is "Sites" capitalized? it should be "sites" instead

dre2phresh’s picture

Why does it matter? It's capitalized because it is my home folder on my ubuntu desktop development server. That's not an issue!

nedjo’s picture

Category: support » bug

This 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.

kingfisher64’s picture

Would deleting the article content type and then re-creating it with different field names eg, (article_image, article_body, article_tags) etc work?

nedjo’s picture

Status: Active » Fixed

Resolved this by changing the name of the field we create (and converting its type from media to image).

Status: Fixed » Closed (fixed)

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