Skip to content
Snippets Groups Projects
Commit 89fb32ac authored by Angie Byron's avatar Angie Byron
Browse files

#1008628 by plach: Fixed Fatal error: Call to undefined function...

#1008628 by plach: Fixed Fatal error: Call to undefined function language_negotiation_get_switch_links() when using only one language
parent 98f287b5
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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;
......
......@@ -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.'));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment