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

Status:needs review» reviewed & tested by the community

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 .

AttachmentSize
node.inc_.patch 531 bytes

#4

thanks,

next fixes will be a real patchfile :)

although the functionality we need all seem to work really well now.

#5

Status:reviewed & tested by the community» needs review

#6

Status:needs review» fixed

Committed!

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.