diff --git a/modules/translation/translation.pages.inc b/modules/translation/translation.pages.inc index 0343b49f467239c44ebbe107eadbaed1cda7d0ab..c70d938981a2d18c819d4994d865d6991432a5f6 100644 --- a/modules/translation/translation.pages.inc +++ b/modules/translation/translation.pages.inc @@ -13,6 +13,8 @@ * Node object. */ function translation_node_overview($node) { + include_once DRUPAL_ROOT . '/includes/language.inc'; + if ($node->tnid) { // Already part of a set, grab that set. $tnid = $node->tnid; diff --git a/modules/translation/translation.test b/modules/translation/translation.test index 7f740d4acba05a84411a81a6ed8b20e504c67af4..701e3dcfdff95957d69070d1c7e75305969214a2 100644 --- a/modules/translation/translation.test +++ b/modules/translation/translation.test @@ -120,6 +120,15 @@ class TranslationTestCase extends DrupalWebTestCase { $this->assertFieldByXPath('//select[@name="language"]//option', 'it', t('Italian (disabled) is available in language selection.')); $translation_it = $this->createTranslation($node, $this->randomName(), $this->randomName(), 'it'); $this->assertRaw($translation_it->body['it'][0]['value'], t('Content created in Italian (disabled).')); + + // Leave just one language enabled and check that the translation overview + // page is still accessible. + $this->drupalLogin($this->admin_user); + $edit = array('enabled[es]' => FALSE); + $this->drupalPost('admin/config/regional/language', $edit, t('Save configuration')); + $this->drupalLogin($this->translator); + $this->drupalGet('node/' . $node->nid . '/translate'); + $this->assertRaw(t('Translations of %title', array('%title' => $node->title)), t('Translation overview page available with only one language enabled.')); } /**