Closed (fixed)
Project:
Gallery
Version:
5.x-2.0-beta5
Component:
Filter / G2Image
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2007 at 19:05 UTC
Updated:
22 Oct 2007 at 23:50 UTC
I use the filter [G2:xxxx] syntax to show photos in my node but I found if the photo is an album (the g_canContainChildren field of g2_item table is "1"), I can see the photo. But if the photo is a photo only (g_canContainChildren is "0"), then I only see "[G2:xxxx]" in node.
It worked in some previous version (a dev version, before beta1), sorry, I cannot remember the exactly date. I also uninstall this module and install again but get the same problem.
Comments
Comment #1
profix898 commentedIf I use
[G2:65]where itemId=65 is a photo, it works fine for me ...Comment #2
dennys commentedThanks, it seems my problem. But is there any suggestion for me to debug it ? I have no idea how to find the problem.
Comment #3
profix898 commentedYou can try two things:
If it does not work either, there is something wrong in G2.
print_r($params);into place, right before the call togetImageBlock()in gallery_filter.inc. This prints out a list of parameters passed togetImageBlock(). You should see at least the two options specified above (specificItem and id).Comment #4
dennys commented1. I used php filter to run the code, it works for both album and photo.
2. The following is the output of print_r($params); when I press submit button. 1001 is a photo, 1704 is an album, the output seems the same ?
Comment #5
profix898 commentedAha. Thats indeed a bug in the module. I guess you have specified a default number of images >1 (9 in your case?) in the filter settings. The filter code uses this instead of n=1 if the simple [G2:x] syntax is used. Bugfix for this committed. Thanks.
Please let me know if I still missed something ;)
Comment #6
dennys commentedMy default number is 3. I changed it to 1 and it's (2.0-beta5) ok. Then I downloaded the new cvs and changed the default number to 3, it's ok too. Thanks.