Commit 343b1b79 authored by hass's avatar hass
Browse files

#1135462: Track translation sets as one unit may produce a notice if

node translation does not exists
parent 29602c8d
......@@ -161,7 +161,7 @@ function googleanalytics_page_alter(&$page) {
// Check we have a node object, it supports translation, and its
// translated node ID (tnid) doesn't match its own node ID.
$node = menu_get_object();
if ($node && translation_supported_type($node->type) && isset($node->tnid) && ($node->tnid != $node->nid)) {
if ($node && translation_supported_type($node->type) && !empty($node->tnid) && ($node->tnid != $node->nid)) {
$source_node = node_load($node->tnid);
$languages = language_list();
$url_custom = drupal_json_encode(url('node/' . $source_node->nid, array('language' => $languages[$source_node->language])));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment