Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Tagging Search isnt working

aeryaery Gtricks Forum in 2.2 :) ✭✭✭
edited February 2011 in Vanilla 2.0 - 2.8
I just enabled Tagging Plugin in my new Forum and made two posts with few tags. But on clicking on tags, the search doesnt fetch results, though there are two sample posts with this tag.

Look at http://www.gtricks.com/forum/discussions/tagged/results

On the sidebar, or at homepage, you can see, the popular tags and the number of posts associated with it. The 'result' tag has two posts but on clicking on it, nothing seems to happen.

@mark, since you are the author of this plugin, please have a look.

There was an error rendering this rich post.

Comments

  • Take a look at the queries that get produced while using the plugin.
    As you can see, the plugin is also used here at vanillaforums.org and here it works.

    Are you using tagging plugin or tagging enhanced?

    There was an error rendering this rich post.

  • MarkMark Vanilla Staff
    As @UnderDog said, you can see the queries on the page by turning on the Debugger plugin (queries will appear at the bottom of the page).
  • aeryaery Gtricks Forum in 2.2 :) ✭✭✭
    I got this -

    7 queries in 0.00861501693726s

    UserModel->GetSession('1')0.000419s
    select u.*
    from GDN_User u
    where u.UserID = '1';
    UserModel->GetSession('1')0.004658s
    set names 'utf8';
    DiscussionModel->Get(0, 10, array('w.Bookmarked' => '1', 'w.UserID' => '1'))0.000945s
    select d.InsertUserID as `FirstUserID`, d.DateInserted as `FirstDate`, d.CountBookmarks as `CountBookmarks`, iu.Name as `FirstName`, iu.Photo as `FirstPhoto`, d.Body as `Body`, d.Format as `Format`, d.DateLastComment as `LastDate`, d.LastCommentUserID as `LastUserID`, lcu.Name as `LastName`, ca.Name as `Category`, ca.UrlCode as `CategoryUrlCode`, ca.PermissionCategoryID as `PermissionCategoryID`, d.*, w.UserID as `WatchUserID`, w.DateLastViewed as `DateLastViewed`, w.Dismissed as `Dismissed`, w.Bookmarked as `Bookmarked`, w.CountComments as `CountCommentWatch`
    from GDN_Discussion d
    left join GDN_User iu on d.InsertUserID = iu.UserID
    left join GDN_User lcu on d.LastCommentUserID = lcu.UserID
    left join GDN_Category ca on d.CategoryID = ca.CategoryID
    left join GDN_UserDiscussion w on d.DiscussionID = w.DiscussionID and w.UserID = 1
    where w.Bookmarked = '1'
    and w.UserID = '1'
    order by d.DateLastComment desc
    limit 10;
    0.000465s
    select *
    from GDN_Tag Tag
    where Name = 'results';
    DiscussionModel->Get(0, '30')0.000597s
    select d.InsertUserID as `FirstUserID`, d.DateInserted as `FirstDate`, d.CountBookmarks as `CountBookmarks`, iu.Name as `FirstName`, iu.Photo as `FirstPhoto`, d.Body as `Body`, d.Format as `Format`, d.DateLastComment as `LastDate`, d.LastCommentUserID as `LastUserID`, lcu.Name as `LastName`, ca.Name as `Category`, ca.UrlCode as `CategoryUrlCode`, ca.PermissionCategoryID as `PermissionCategoryID`, d.*, w.UserID as `WatchUserID`, w.DateLastViewed as `DateLastViewed`, w.Dismissed as `Dismissed`, w.Bookmarked as `Bookmarked`, w.CountComments as `CountCommentWatch`
    from GDN_Discussion d
    left join GDN_User iu on d.InsertUserID = iu.UserID
    left join GDN_User lcu on d.LastCommentUserID = lcu.UserID
    left join GDN_Category ca on d.CategoryID = ca.CategoryID
    left join GDN_UserDiscussion w on d.DiscussionID = w.DiscussionID and w.UserID = 1
    join GDN_TagDiscussion td on d.DiscussionID = td.DiscussionID and td.TagID = 3
    order by d.DateLastComment desc
    limit 30;
    0.000528s
    select t.*
    from GDN_Tag t
    where t.CountDiscussions > '0'
    order by t.CountDiscussions desc
    limit 25;
    0.001003s
    insert into GDN_AnalyticsLocal (TimeSlot, Views) values ('20110228', 1)
    on duplicate key update Views = Views+1;

    Controller Data

    Tag: 'results'
    Title: 'Tagged with results - Gtricks forum'
    Category: false
    CountDiscussions: '2'
    Announcements:
    Discussions: DataSet
    EMPTY
    CssClass: 'Vanilla Discussions tagged '

    Page completed in 0.9638s



    and I guess select * from GDN_Tag Tag where Name = 'results'; is correct.


    @mark, one more bug, debugger doent work in brandfriendly theme by @digibomb.

    There was an error rendering this rich post.

  • Execute these 2 queries:
    select t.* from GDN_Tag t where t.CountDiscussions > '0' order by t.CountDiscussions desc limit 25;
    and
    select * from GDN_Tag Tag where Name = 'results'; and see what comes up in PHPMyAdmin

    There was an error rendering this rich post.

  • aeryaery Gtricks Forum in 2.2 :) ✭✭✭
    The first query gets successfully executed and listed and all the tags.

    The second query gave following results -

    TagID Name InsertUserID DateInserted CountDiscussions

    3 results 1 2011-02-27 14:48:11 2

    @mark, @UnderDog , what should I do?

    There was an error rendering this rich post.

Sign In or Register to comment.