Before #470242: Namespacing for bundle names got fixed, we had to add a prefix to comment bundles names to differentiate between bundle 'article' on nodes and bundle 'article' on comments. This can now go away.

No UI for fields on comments yet, so this has to be tested either through #538164: Comment body as field or by running the following code in a devel PHP block.

$field = array(
  'field_name' => 'field_test_comment',
  'cardinality' => FIELD_CARDINALITY_UNLIMITED,
  'type' => 'text',
);
$instance = array(
  'field_name' => 'field_test_comment',
  'object_type' => 'comment',
  'bundle' => 'article',
  'label' => 'Multiple',
);
field_create_field($field);
field_create_instance($instance);
CommentFileSizeAuthor
comment_bundles.patch4.03 KByched

Comments

catch’s picture

My only concern about this one, is that one day, we might want to make comment module work for entities other than node. Then the bundles for comments, would be any of the bundles attached to any of the entities that comments can be attached to. So, is it worth leaving the 'node' namespace in (but removing comment_), or do we worry about that later?

yched’s picture

Hm, though one. 'Comments on entities' is a little hard to predict. It does sound like 'comments as field', in which case the 'bundle' strategy might also be one bundle per 'comments' field (bundle name = comments field name) : article and page share the same 'comments' field => their comments have the same set of fields.

OK, tricky case of future-telling. Maybe we can just punt for now and keep the current, then :-p.

MichaelCole’s picture

comment_bundles.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, comment_bundles.patch, failed testing.

sun’s picture

Version: 7.x-dev » 8.x-dev
andypost’s picture

seems no more an issue for d8

yched’s picture

Status: Needs work » Closed (duplicate)