diff options
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 543c40f77..0f0d171cf 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -2203,7 +2203,11 @@ function node_page_default() { function node_page_view($node) { $return = node_show($node); if (isset($return['nodes'][$node->nid]['title'])) { - drupal_set_title($return['nodes'][$node->nid]['title']['items'][0]['#item']['value']); + // Get the language that was determined by language fallback logic during the + // field_attach_display() workflow. + // @todo That logic should be made available separately. + $langcode = $return['nodes'][$node->nid]['title']['#language']; + drupal_set_title($node->title[$langcode][0]['value']); } // Set the node path as the canonical URL to prevent duplicate content. drupal_add_html_head_link(array('rel' => 'canonical', 'href' => url('node/' . $node->nid)), TRUE); |