diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 9a43ef9..085802d 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1163,6 +1163,7 @@ function comment_num_new($entity_id, $entity_type, $field_name = NULL, $timestam // Retrieve the timestamp at which the current user last viewed this entity. if (!$timestamp) { $timestamp = \Drupal::service('history.manager')->getLastViewed($entity_type, array($entity_id)); + $timestamp = $timestamp[$entity_id]; } $timestamp = ($timestamp > HISTORY_READ_LIMIT ? $timestamp : HISTORY_READ_LIMIT); diff --git a/core/modules/history/history.install b/core/modules/history/history.install index 67cacd6..8714b27 100644 --- a/core/modules/history/history.install +++ b/core/modules/history/history.install @@ -22,7 +22,7 @@ function history_schema() { 'description' => 'The type of the entity that was read.', 'type' => 'varchar', 'not null' => TRUE, - 'default' => 'node', + 'default' => '', 'length' => 255, ), 'entity_id' => array( diff --git a/core/modules/node/node.install b/core/modules/node/node.install index 58e43cc..b3e2b9f 100644 --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -732,6 +732,7 @@ function node_update_8012() { 'description' => 'The type of the entity that was read.', 'type' => 'varchar', 'not null' => TRUE, + 'default' => '', 'initial' => 'node', 'length' => 255, ));