Why does node_add_body_field() lock down 'body' field instances to the 'node' entity type? For a current project our taxonomy terms need a text field with a summary; naturally as there's already a body field available on nodes, I thought I'd just use that.

Confusingly, 'body' doesn't appear in the list of existing fields when managing fields for the taxonomy term. No problem thought I, I'll just use field_create_instance() and add it manually. Drupal objected:


  Attempt to create an instance of field body on forbidden entity type taxonomy_term.


So I thought I'd get clever. I loaded up the field config, added taxonomy_term to the array of entity_types, and tried to update with field_update_field(). Nope:


  Cannot change an existing field's entity_types property.


It turns out node_add_body_field() does this unconditionally:

$field = array(
  'field_name' =&gt; 'body',
  'type' =&gt; 'text_with_summary',
  'entity_types' =&gt; array('node'),
);
$field = field_create_field($field);


I (perhaps naively, not sure yet) disagreed with Drupal's various assessments, so I went into the database and manually added taxonomy_term to the list of allowed entity types for the body field. Works great, I haven't noticed any ill-effects so far, and the body field is where I expect it to be.

So I guess my question is two-fold:


What reason could there be for the node module locking down this field to a single entity type?
Can I expect to see any bad effects from this further down the line?
I would expect it is for historical reasons and is a place to migrate data from the old Drupal 6 body field.

Since the old Drupal 6 body field was just for nodes it seems in some ways logical that they would then also restrict this to just nodes so it is as it was in Drupal 6.

A couple of quick (not so thorough) greps didn't turn up any code that looks like it would cause you trouble using it for other entities but I could have missed something.

I would not think that this would cause you much trouble in future but I'm not sure of that.

A possible downside though is that it is in some ways like hacking core.
If someone else inherits your site they may find it unusual that your site behaves differently than usual.

Personally sometimes I remove the drupal core body field and add my own field_body and use that throughout the site.