- Patch #1408636 by swentel, c31ck: fixed fatal error when viewing unpublished nodes with the translator module enabled.
parent
39b1878c84
commit
e341d8ec6e
|
@ -532,7 +532,7 @@ function translation_language_switch_links_alter(array &$links, $type, $path) {
|
||||||
else {
|
else {
|
||||||
// No translation in this language, or no permission to view.
|
// No translation in this language, or no permission to view.
|
||||||
unset($links[$langcode]['href']);
|
unset($links[$langcode]['href']);
|
||||||
$links[$langcode]['attributes']['class'] = 'locale-untranslated';
|
$links[$langcode]['attributes']['class'][] = 'locale-untranslated';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -436,7 +436,7 @@ class TranslationTestCase extends DrupalWebTestCase {
|
||||||
$xpath = '//div[contains(@class, :type)]//a[@href=:url]';
|
$xpath = '//div[contains(@class, :type)]//a[@href=:url]';
|
||||||
}
|
}
|
||||||
else {
|
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);
|
$found = $this->findContentByXPath($xpath, array(':type' => $type, ':url' => $url), $translation_language->name);
|
||||||
|
|
Loading…
Reference in New Issue