diff --git a/core/modules/comment/lib/Drupal/comment/CommentFieldNameValue.php b/core/modules/comment/lib/Drupal/comment/CommentFieldNameValue.php index 7907ba8..44f543e 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentFieldNameValue.php +++ b/core/modules/comment/lib/Drupal/comment/CommentFieldNameValue.php @@ -26,9 +26,7 @@ public function getValue() { } $field = $this->parent->getParent(); $entity = $field->getParent(); - // Field id is of the form {entity_type}__{field_name}. We set the - // optional limit param to explode() in case the user adds a field with __ - // in the name. + // Field id is of the form {entity_type}.{field_name}. $parts = explode('.', $entity->getFieldId(), 2); if ($parts && count($parts) == 2) { $this->value = end($parts); diff --git a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php index 6265b1f..c8070a2 100644 --- a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php +++ b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php @@ -77,7 +77,7 @@ public function __construct(array $values, $entity_type, $bundle = FALSE, $trans // Initialize missed values. if (isset($values['field_id'])) { $bundle = $values['entity_type'] . '__' . $values['field_name']; - $values['field_id'] = $bundle; + $values['field_id'] = $values['entity_type'] . '.' . $values['field_name']; } else { $bundle = str_replace('.', '__', $values['field_id']);