Hi @all,
I just mentioned that the Node context plugin uses a translation_node_nid() call to determine if there is a translation of the node used in the context (around line 48 of plugins/contexts/node.inc):
if (module_exists('translation')) {
if ($translation = module_invoke('translation', 'node_nid', $nid, $GLOBALS['language']->language)) {
$nid = $translation;
$reload = TRUE;
}
}
This hook does not exist and this has to be used instead in order to get it working:
if (module_exists('translation')) {
if ($translations = module_invoke('translation', 'node_get_translations', $nid)) {
if ($translations[$GLOBALS['language']->language]) {
$nid = $translations[$GLOBALS['language']->language]->nid;
$reload = TRUE;
}
}
}
Hope this can be fixed soon?
Thanx in advance & cheers
hctom
Comments
Comment #1
benclark commentedI ran into this issue, too, and I decided to roll a patch just in case this helps. I'm open to alternative solutions if this isn't the correct approach. I just know that when I add a specific node as a context, it won't pull in the translation automatically unless I apply this patch.
Comment #2
japerryDrupal 6 is no longer supported, closing.