diff --git a/metatag.module b/metatag.module index 7f5ca7c..d9fd561 100644 --- a/metatag.module +++ b/metatag.module @@ -695,8 +695,7 @@ function metatag_entity_update($entity, $entity_type) { } // Save the record. - $old_vid = isset($entity->old_vid) ? $entity->old_vid : NULL; - metatag_metatags_save($entity_type, $entity_id, $revision_id, $entity->metatags, $new_language, $old_vid); + metatag_metatags_save($entity_type, $entity_id, $revision_id, $entity->metatags, $new_language, $entity->old_vid); } else { // Still ensure the meta tag output is cached. @@ -1373,12 +1372,7 @@ function metatag_page_build(&$page) { */ function _metatag_entity_is_page($entity_type, $entity) { $uri = entity_uri($entity_type, $entity); - if (module_exists('workbench_moderation') && workbench_moderation_node_type_moderated($entity->type) === TRUE) { - return !empty($uri['path']) && (current_path() == $uri['path'] || current_path() == $uri['path'] . '/draft'); - } - else { - return !empty($uri['path']) && current_path() == $uri['path']; - } + return !empty($uri['path']) && current_path() == $uri['path']; } /** @@ -1973,8 +1967,9 @@ function _metatag_isdefaultrevision($entity) { // @todo: Refactor this workaround under D8. // Workbench Moderation module. - if (module_exists('workbench_moderation') && workbench_moderation_node_type_moderated($entity->type) === TRUE) { - return !empty($entity->workbench_moderation['updating_live_revision']); + if (module_exists('workbench_moderation') && workbench_moderation_node_type_moderated($entity->type) === TRUE && empty($entity->workbench_moderation['updating_live_revision'])) { + return FALSE; } - return FALSE; + + return TRUE; }