Closed (fixed)
Project:
ShareBar
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jun 2012 at 02:29 UTC
Updated:
26 Nov 2014 at 09:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
noslokire commentedSame here.
Comment #2
nmudgal commentedNope, I didn't get any such issue.
I downloaded both modules sharebar[7.x-1.x-dev] & panels[7.x-3.2] in fresh drupal 7 installation & tried creating mini panel, & panel node, but couldn't regenerate issue.
It would be nice if you can tell more information in terms of versions used, what exactly did you do? etc which can help me to reproduce it.
Thanks
Comment #3
noslokire commentedI'm not sure about the first person, but I am not creating a Panel node using the Panels module. I am using Panels to override the node template for a particular content type.
I am on the latest stable Panels/CTools versions like you are testing above.
Comment #4
ganagus commentedYes, I confirmed this issue too. I have the same configuration with @noslokire, using Panels to override node template. The error is the same: Notice: Undefined index: nodes in sharebar_preprocess_region() (line 120 of ...
Look at the attachment, there is no 'nodes' index in $variables['elements']['system_main'] when using Panels to override node template.
Comment #5
ganagus commentedI think the error comes from the code to obtain $node->type. The code assumes the node type can always be obtained from the $variables['elements']['system_main']['nodes'], but when using Panels to override node template, the variable is not available.
How about check it first, if available, we can take it from $variables. Otherwise, I think we can use node_load() function to get node type. Using node_load() does incur additional overhead, but it's the most intuitive source to obtain node type.
This is just my code suggestion, I'd be glad if we can discuss it here:
Comment #6
nmudgal commentedganagus,
Thanks, would you like to throw a patch for it?
Comment #7
acrollet commentedI can confirm the bug, and that the code in #5 fixes the issue. I went ahead and rolled a patch, attaching here.
Comment #9
nmudgal commented#7: sharebar-panels_compatibility-1617110-7.patch queued for re-testing.
Comment #11
flashwebcenterYes, I confirmed this issue too. I am using Panels to override node template. The error is the same: Notice: Undefined index: nodes in sharebar_preprocess_region() (line 120 of ..
Here is another version of the patch, I applied this patch and I tested several times. I don't see the error anymore.
Comment #16
nmudgal commentedApplied patch with some changes. Let's hope it doesn't break unknowns. Thanks much guys (:
Comment #17
nmudgal commented