Your hook_node_view() is incorrect, check the documentation and example implementations. The first argument is a $build array$build array
.
That's the new $node->content$node->content
: What your code is adding to $node->content
should be added to $build
.
Also, never render things yourself.: Just put your render array ($node_statistics$node_statistics
) in $build['content_statistics_list']$build['content_statistics_list']
.
It's also recommended to implement hook_entity_extra_field_info()hook_entity_extra_field_info()
and expose that key as an extra field. Then it can be shown/hidden based on the view mode.