Closed (fixed)
Project:
Node Gallery
Version:
6.x-2.0-beta2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2010 at 00:58 UTC
Updated:
22 Oct 2010 at 01:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
AdrianC-1 commentedI think this is similar to what I'm seeing using Views_Slideshow. Within the Views edit, the only vaguely image field I can see is Node Gallery Image:Image - which is always the node_gallery_thumbnail version, no matter whether teaser or gallery is selected as the Image List View Mode.
Comment #2
jergason commentedI implemented a quick and dirty fix by changing some code in the module. In the function
_node_gallery_gallery_viewon line 292 of node_galler.module there is a big switch statement that checks if the $page variable is set or not. If it is set, it will display the node as a node, and if $page is not set, then it defaults to the teaser.$page is true if the node is to display in a full page state, which means that it is the main content of a page, not displayed in a view or another node. If the node is displayed in a view or in another node through node reference fields, then $page will be false and
_node_gallery_gallery_viewwill render the node as a teaser, even when you want it to display as a full node.My dirty hack was to change this on line 294:
to this:
This means that if the node is displayed as a node if $page is true, or if $teaser is false - ie in a view or node reference field that is set to display the full node. I am still learning how to do patches, so I will whip one together and post it on here to see if it works.
Comment #3
jergason commentedThis still appears to be a problem in 6.x-2.0-beta2. Here is my patch that fixes it. Don't know if it broke anything else though.
Comment #4
justintime commentedWow. Learn something new every day.
http://api.drupal.org/api/function/node_view/6
Keying on $a4 from nodeapi isn't what we want to do. There's other areas in the module where this happens, so I'll fix it up.
BTW: I hope you're not using the patch from #3, you missed the '!' character. :)
Comment #5
justintime commentedAttached is a patch that replaces all checks for $page from nodeapi to check for !$teaser. Testing is appreciated.
Comment #6
justintime commentedCommitting this to dev so it can get some testing and get included in the next beta release.