- Patch #1408636 by swentel, c31ck: fixed fatal error when viewing unpublished nodes with the translator module enabled.

8.0.x
Dries 2012-01-24 16:42:56 -05:00
parent 39b1878c84
commit e341d8ec6e
2 changed files with 2 additions and 2 deletions

View File

@ -532,7 +532,7 @@ function translation_language_switch_links_alter(array &$links, $type, $path) {
else {
// No translation in this language, or no permission to view.
unset($links[$langcode]['href']);
$links[$langcode]['attributes']['class'] = 'locale-untranslated';
$links[$langcode]['attributes']['class'][] = 'locale-untranslated';
}
}
}

View File

@ -436,7 +436,7 @@ class TranslationTestCase extends DrupalWebTestCase {
$xpath = '//div[contains(@class, :type)]//a[@href=:url]';
}
else {
$xpath = '//div[contains(@class, :type)]//span[@class="locale-untranslated"]';
$xpath = '//div[contains(@class, :type)]//span[contains(@class, "locale-untranslated")]';
}
$found = $this->findContentByXPath($xpath, array(':type' => $type, ':url' => $url), $translation_language->name);