Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
comment.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2013 at 16:54 UTC
Updated:
29 Jul 2014 at 23:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
larowlanThis will make a lot of code cleaner
Comment #2
amateescu commentedForgot to say that I'd prefer this to wait for #2112239: Convert base field and property definitions.
Comment #3
berdirComment #4
klausiDuplicate of #2181593: Convert entity bundle base fields to entity reference.
Comment #5
andypostActive again because #2181593-26: Convert entity bundle base fields to entity reference
Also closed #2197723: Comment::getFieldId() should return actual field ID as duplicate
Comment #6
andypostComment #7
andypostupdated summary about 'field_id' is used as bundle for comment entity
Comment #8
andypostlet's try fix in constructor
Comment #9
andypostfix bug
Comment #10
andypostadded related issues
Comment #13
andypostAnother round
Comment #15
andypostSuppose the issue should be renamed to "rename confusing field_id to bundle" - there's no way to make it ER.
Also patch just cleans up a bit code, core needs to provide a right approach to create comments - by providing entity type and field name.
Main purpose of the patch:
1) remove ER definition - a part of #2002158: Convert form validation of comments to entity validation
2) change the logic to get field name.
Probably one day we could make 'entity_type' a required field...
Details:
At least
EntiyDisplayBasecalls_field_create_entity_from_ids()to create comment entity for internal use, so we still can't make "entity_type" field required.I've checked that core does not trying to exlode "field_id" value to get entity type ID - so for now comment module is safe.
Comment #17
andypostThe problem here that I was trying to convert to
field_idthat actually a reference to field instance, that generated when comment field is bound to entity.Comment #18
andypost#2233157: Make the comment entity_id be a reference field is commited so we can close this one
Comment #19
berdirThis issue is about the field_id, the other one was about the entity_id, not the same thing...
Comment #20
andypostsure
Comment #21
larowlanfield_id is gone now, we have comment_type instead (which is an ER field)