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.
Options

Forum search error

When I run a search on my forum using the default search function, I get red box with a huge error message which starts like this: The used SELECT statements have a different number of columns|Gdn_Database|Query|select * from ( select match(d.Name, d.Body) against(:Search0 in boolean mode) as Relavence, d.DiscussionID as PrimaryID, d.Name as Title, d.Body as Summary, d.Format as Format, d.CategoryID as CategoryID,

Please any idea on how to solve this problem?

Tagged:

Best Answer

Answers

  • Options

    what version of vanilla? do you have sphinxsearch installed?

    did you run utility/structure?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    I use version 2.1.1
    I ran utility/structure and got the message below
    "There are no database structure changes required. There may, however, be data changes."

    Clicking on button "Run structure & data scripts" says "The structure was successfully executed."
    However, the search function on the forum is still producing error as before.

    Error is like this:
    The used SELECT statements have a different number of columns|Gdn_Database|Query|select * from ( select d.DateInserted as Relavence, d.DiscussionID as PrimaryID, d.Name as Title, d.Body as Summary, d.Format as Format, d.CategoryID as CategoryID, concat('/discussion/', d.DiscussionID) as Url, d.DateInserted as DateInserted, d.InsertUserID as UserID, 'Discussion' as RecordType from GDN_Discussion d where d.CategoryID in (-1, 33, 34, 35, 3, 52, 51, 6, 40, 4, 1, 8, 9, 11, 36, 32, 31, 16, 17, 13, 30, 14, 20, 21, 22, 15, 42, 41, 28, 29) and (d.Name like :Search0 or d.Body like :Search1) union all select c.DateInserted as Relavence, c.CommentID as PrimaryID, d.Name as Title, c.Body as Summary, c.Format as Format, d.CategoryID as CategoryID, concat('/discussion/comment/', c.CommentID, '/#Comment_', c.CommentID) as Url, c.DateInserted as DateInserted, c.InsertUserID as UserID, 'Comment' as RecordType from GDN_Comment c join GDN_Discussion d on d.DiscussionID = c.DiscussionID where d.CategoryID in ('-1', '33', '34', '35', '3', '52', '51', '6', '40', '4', '1', '8', '9', '11', '36', '32', '31', '16', '17', '13', '30', '14', '20', '21', '22', '15', '42', '41', '28', '29') and (c.Body like :Search2) union all select p.DateInserted as Relavence, p.PageID as PrimaryID, p.Name as Title, p.Body as Summary, "page", null, concat('/page/', p.UrlCode) as Url, p.DateInserted as DateInserted, p.InsertUserID as UserID from GDN_Page p join GDN_Discussion d on d.DiscussionID = p.PageID where (p.Name like :Search3 or p.Body like :Search4) ) s order by s.DateInserted desc limit 20

  • Options

    Relavence - at first I thought Sphinxsearch was the only plugin that misspelled relevance incorrectly.
    but vanilla misspells it as well :)

    Are you using sphinxsearch or is it disabled.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    I don't even have the plugin sphinsearch on the forum. So should I download, install and enable it on my forum?

  • Options
    peregrineperegrine MVP
    edited September 2014

    what plugins do you have installed. and did any of them alter table structure or did you.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    ProsperProsper ✭✭
    edited September 2014

    @peregrine.
    I have about 39 plugins installed on the forum which some of them don't work well. I am not sure which one altered table structure. The 39 enabled plugins are:

    1. ActivityPurge
    2. Add Menu Item
    3. Add Registration Question
    4. Add Text To Box
    5. AddVoice
    6. Button Bar
    7. Buttons
    8. Category Accordion
    9. Category Ads
    10. Contact
    11. Copyright (still does not show up on all mobile all pages. Added 'MobileFriendly' => TRUE,)
    12. EMailDiscussion
    13. FbPopupJoin
    14. FileUpload (not working - endless uploading without actually uploading)
    15. Flagging
    16. Friendships
    17. Go Back Mobile
    18. ImageUpload
    19. Infinite Scroll
    20. Jump To Top
    21. Mediator
    22. Members List Enhanced
    23. Mobile Search
    24. Participated Discussions
    25. PM
    26. Pockets
    27. Profile Extender
    28. Q&A
    29. Registration Restrict Logger
    30. Sitemaps
    31. Statistics Footer
    32. Stop Forum Spam
    33. TopPosters (not working - shows blank page when clicked on for setting but shows on forum front-end)
    34. Vanilla SEO
    35. Vanilla Statistics
    36. Vanillicon
    37. Web Title
    38. WhosOnlinePro (not working - shows blank page when clicked on for setting and does not show on forum)
    39. WYSIWYG (CLEditor)
  • Options
    peregrineperegrine MVP
    edited September 2014

    I guess you are the unlucky recipient of this... maybe a few people will act as well instead of being passive and just asking for help.

    out of curiousity is there a reason you didn't add your results to here to help the community...

    or were you only looking for help instead of giving it >:)

    http://vanillaforums.org/discussion/26703/plugins-themes-that-work-and-don-t-work-in-vanilla-2-1

    disable all of them and see if search works.

    I've already spent more than a few hours helping you in the past, take a few minutes and help the community by posting what plugins work and don't work and give reasons (e.g. blank page on setting) if they don't

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    see this as well and after you read that, start at the top.

    http://vanillaforums.org/discussion/comment/199091/#Comment_199091

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    @Prosper peregrine is right. Most important is to post which plugins aren't working correctly. Disable all plugins and enable them one by one using the search, so : all disabled ... search, enable ActivityPurge, search, enable Add Menu Item, search and so on...

    There was an error rendering this rich post.

  • Options
    ProsperProsper ✭✭
    edited September 2014

    @peregrine - I just sent a little donation through PayPal account asi....cp@yahoo.com) for your assistance so far. Have you received it.
    @UnderDog, @[eregrine - I have disabled all plugins and did exactly as you said but the search error persists. Please what else can I do?

  • Options
    peregrineperegrine MVP
    edited September 2014

    yes, thank you for the donation. @Prosper

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    I'll pm you.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    do you have a link to your site that you can post?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    Send you reply via yahoo but return message saying I don't have permission to send message

  • Options

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    ProsperProsper ✭✭
    edited September 2014

    @peregrine - Thank you for your assistance solving the issue of search function not working on version 2.1.1. VanillaCMS was the cause and has been disabled on the forum.

Sign In or Register to comment.