When using HOOK_node_view() you should take care because when the search (Search API especially) is indexing, this hook is also being called. You can not rely on a user displaying the node display currently. Here's a way to ensure this...
This post saved you a lot of time and headache?
Then I'd be very happy about a delicious coffee! Or a helpful book from my wish list.
Or are you looking for professional web software development?
Our experienced team at webks GmbH consults, develops & implements individual, innovative web, eCommerce, Drupal CMS & mobile applications.