diff --git a/metatag.module b/metatag.module index ecbec26..de8134b 100644 --- a/metatag.module +++ b/metatag.module @@ -643,7 +643,7 @@ function metatag_entity_view($entity, $entity_type, $view_mode, $langcode) { $cid = "output:{$entity_type}:{$entity_id}:{$langcode}:" . hash('sha256', serialize($cid_parts)); if ($cache = cache_get($cid, 'cache_metatag')) { - $entity->content['metatags'] = $cache->data; + $output = $cache->data; } else { $metatags = isset($entity->metatags) ? $entity->metatags : array(); @@ -669,12 +669,12 @@ function metatag_entity_view($entity, $entity_type, $view_mode, $langcode) { // Render the metatags and save to the cache. $entity->content['metatags'] = metatag_metatags_view($instance, $metatags, $options); - cache_set($cid, $entity->content['metatags'], 'cache_metatag'); + cache_set($cid, $output, 'cache_metatag'); } // We need to register the term's metatags, so we can later fetch them. // @see metatag_page_build(). - metatag_page_set_metatags($instance, $entity->content['metatags']); + metatag_page_set_metatags($instance, $output); } }