Forum Index > FlashYourWeb OS Support > Gallery 2 Bridge New Topic Post Reply
 Autotags g2_view:tags not working (solved)
 |  Printable Version
Anonymous: furono
 November 24 2008 23:17 pm (Read 1636 times)  


[g2bridge:272 mode:dynamic g2_view:tags g2_tagName:thumb useThumb:1 total:5 showTitle:1 column:5]

I didn't see a full example using g2_view:tags but used your mini example next to g2_tagName

I get a blank screen with no errors reported in apache2 log or geeklog error.log. If I try a tag that doesn't exist it just says "Array" in the block I inserted the above code. I have the module enabled in Gallery2. The tag exists.

I couldn't get keywords to work either.

Everything else works fine like:
[g2bridge:272 mode:dynamic g2_view:updates showTitle:1 total:5 useThumb:1 column:5]

Latest everything:

Geeklog 1.5.1
G2Bridge 2.3
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6-2ubuntu4 apache2handler
Webserver = Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch
Database = mysqli 5.0.67-0ubuntu6, lock.system=flock
Toolkits = ArchiveUpload, Dcraw, Exif, Ffmpeg, Getid3, ImageMagick, jpegtran, LinkItemToolkit, Thumbnail, Gd, SquareThumb
Acceleration = none, none
Operating system = Linux test 2.6.27-7-server #1 SMP Tue Nov 4 20:18:35 UTC 2008 i686
Default theme = matrix
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4


 
Quote
Anonymous: furono
 November 24 2008 23:21 pm  


The tag is on the photos also, forgot to mention it.

Steve


 
Quote
Anonymous: furono
 November 24 2008 23:31 pm  


Sorry I was trying a bunch of variations and should of said g2_view:tag as it is on your example: This is the way it's on your examples:

[g2bridge:272 mode:dynamic g2_view:tag g2_tagName:thumb showTitle:1 total:5 useThumb:1 column:5]


 
Quote
Anonymous: furono
 November 24 2008 23:55 pm  


Ok caught the first problem:

functions.inc line 163

$g2_tagName = $a[1];
$params .= '%26g2_tagname='.$g2_tagname;

The variable name is case-sensitive correct?

Changed it still didn't work but the variable is picked up and shows in the $params when echo'd.

Steve


 
Quote
Anonymous: furono
 November 25 2008 00:34 am  


Second problem but when I fix it is gives me the blank screen. Will look for more tomorrow.

Documentation says: g2_tagName Tag to search for with mode:dynamic g2_view:tag g2_tagName:my_fun_keyword

Notice below it says "tags" and documentation says "tag". Doesn't get picked up. When I change I get a blank screen no error.


Line 252 functions.inc

switch ($g2_view) {

case 'tags':
$link = G2B_getTagChildIds($userId, $g2_tagName);


 
Quote
suprsidr
 November 25 2008 04:38 am  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

Wow Steve, you've had a busy night while I was sleeping Wink

Personally I don't use tags or keywords, so testing was minimal and I rely on folks like you to alert me to these types of issues.

I believe you need to add:

PHP Formatted Code
GalleryCoreApi::requireOnce('modules/tags/classes/TagsHelper.class');


just above the block which calls the class:
PHP Formatted Code
        /* Force case-sensitive look-up to make the query use an column index */
        list ($ret, $tagId) = TagsHelper::getTagIdFromName($tagName, true);
        if ($ret) {
            return array($ret, null);
        }
 


and yes it should be tags:
[g2bridge:272 mode:dynamic g2_view:tags g2_tagName:thumb useThumb:1 total:5 showTitle:1 column:5]
I'll update the examples ... good catch.

-s


There will always be...
 
Profile Email Website
Quote
Anonymous: furono
 November 25 2008 20:56 pm  


Thanks. I'm on Japan time so I work during your nights. I don't mind helping debug at all, it's the least I can do.

I tried what you said and still got the blank screen. When checking things I found the offending line, didn't deeper yet. Something in that getDisabledFlag is causing it.

$disabled = getDisabledFlag($childItem->getId());

Will keep digging.

Steve


 
Quote
Anonymous: furono
 November 25 2008 21:02 pm  


Found it!

getDisabledFlag

should of been:

G2B_getDisabledFlag


 
Quote
suprsidr
 November 25 2008 21:10 pm  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

Thanks a bunch. I just updated the download Wink

-s


There will always be...
 
Profile Email Website
Quote
Content generated in: 0.26 seconds
New Topic Post Reply



 All times are PST. The time is now 04:42 am.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
HTML Allowed 
Censored Content