Forum search error
![Prosper](https://secure.gravatar.com/avatar/454cd7749f553001cb5ea034ac9db323/?default=https%3A%2F%2Fvanillicon.com%2F629617c412799f8b69bc1fc233dc810d_100.png&rating=g&size=100)
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?
Best Answer
-
peregrine MVP
Turns out the Vanilla CMS application caused the search error proper was experiencing.
disabling Vanilla CMS app - and search worked once again.
I never used taht app, don't know if anyone else does. but something to keep in mind.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
7
Answers
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.
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 asPrimaryID
, d.Name asTitle
, d.Body asSummary
, d.Format asFormat
, d.CategoryID asCategoryID
, concat('/discussion/', d.DiscussionID) asUrl
, d.DateInserted asDateInserted
, d.InsertUserID asUserID
, 'Discussion' asRecordType
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 asRelavence
, c.CommentID asPrimaryID
, d.Name asTitle
, c.Body asSummary
, c.Format asFormat
, d.CategoryID asCategoryID
, concat('/discussion/comment/', c.CommentID, '/#Comment_', c.CommentID) asUrl
, c.DateInserted asDateInserted
, c.InsertUserID asUserID
, 'Comment' asRecordType
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 asRelavence
, p.PageID asPrimaryID
, p.Name asTitle
, p.Body asSummary
, "page", null, concat('/page/', p.UrlCode) asUrl
, p.DateInserted asDateInserted
, p.InsertUserID asUserID
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 20Relavence - at first I thought Sphinxsearch was the only plugin that misspelled relevance incorrectly.![:) :)](https://open.vanillaforums.com/plugins/emojiextender/emoji/little/smile.png)
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.
I don't even have the plugin sphinsearch on the forum. So should I download, install and enable it on my forum?
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.
@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:
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![>:) >:)](https://open.vanillaforums.com/plugins/emojiextender/emoji/little/naughty.png)
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.
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.
@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.
@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?
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.
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.
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.
Send you reply via yahoo but return message saying I don't have permission to send message
click here
http://vanillaforums.org/messages/all
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Turns out the Vanilla CMS application caused the search error proper was experiencing.
disabling Vanilla CMS app - and search worked once again.
I never used taht app, don't know if anyone else does. but something to keep in mind.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@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.