Posted by catorghans on April 22, 2008 at 12:39pm
| Project: | Panels |
| Version: | 5.x-2.0-beta3 |
| Component: | Plugins - contexts |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
To let translations of contexts nodes work within a panel I added a few lines of code which already existed in the legacy node code but not in the contexts node.inc:
In function panels_context_create_node
I changed $data = node_load($data['nid']);
into
$nid = $data['nid'];
if (module_exists('translation')) {
if ($translation = module_invoke('translation', 'node_nid', $nid, $GLOBALS['locale'])) {
$nid = $translation;
}
}
$data = node_load($nid);
Comments
#1
I've been testing this and it seems to work for me.
Thanks.
#2
Thanks for this. However, I'd prefer it if you could follow the drupal patch guidelines, even for something small like this; it makes it easier, quicker, and more stable for me to test patches that have been submitted as actual patch files.
#3
This is the patch for contexts/node.inc .
#4
thanks,
next fixes will be a real patchfile :)
although the functionality we need all seem to work really well now.
#5
#6
Committed!
#7
Automatically closed -- issue fixed for two weeks with no activity.