I had started our website in 2.3.7 and had everything working fine. Then I noticed the 2.4.0 was coming out so I held off a few days to install the site when 2.4.0 came out. Now, when I run a search on the site I am getting an SQL error that I can't seem to get past. The actual error is listed below:
[User Error] Couldn't run query: SELECT ClassName, "SiteTree_Live".ID, ParentID, Title, MenuTitle, URLSegment, Content, LastEdited, Created, _utf8'' AS Filename, _utf8'' AS Name, MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home') + MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home') AS Relevance, CanViewType FROM "SiteTree_Live" WHERE ( MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home*' IN BOOLEAN MODE) + MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home*' IN BOOLEAN MODE) AND ShowInSearch 0) AND ("SiteTree_Live"."Locale" = 'en_US') UNION SELECT ClassName, "File".ID, _utf8'' AS ParentID, Title, _utf8'' AS MenuTitle, _utf8'' AS URLSegment, Content, LastEdited, Created, Filename, Name, MATCH (Filename, Title, Content) AGAINST ('home') AS Relevance, NULL AS CanViewType FROM "File" WHERE (MATCH (Filename, Title, Content) AGAINST ('home*' IN BOOLEAN MODE) AND ClassName = 'File') ORDER BY Relevance DESC LIMIT 0, 3 Can't find FULLTEXT index matching the column list
GET /home/SearchForm?Search=home&locale=en_US&action_results=Search
Line 536 in /srv/http/nginx/html/sapphire/core/model/MySQLDatabase.php
Source
527 }
528
529 function databaseError($msg, $errorLevel = E_USER_ERROR) {
530 // try to extract and format query
531 if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
532 $formatter = new SQLFormatter();
533 $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
534 }
535
536 user_error($msg, $errorLevel);
537 }
538
539 /**
540 * Return a boolean type-formatted string
541 *
542 * @param array $values Contains a tokenised list of info about this data type
Trace
* Couldn't run query: SELECT ClassName, "SiteTree_Live".ID, ParentID, Title, MenuTitle, URLSegment, Content, LastEdited, Created, _utf8'' AS Filename, _utf8'' AS Name, MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home') + MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home') AS Relevance, CanViewType FROM "SiteTree_Live" WHERE ( MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home*' IN BOOLEAN MODE) + MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home*' IN BOOLEAN MODE) AND ShowInSearch <> 0) AND ("SiteTree_Live"."Locale" = 'en_US') UNION SELECT ClassName, "File".ID, _utf8'' AS ParentID, Title, _utf8'' AS MenuTitle, _utf8'' AS URLSegment, Content, LastEdited, Created, Filename, Name, MATCH (Filename, Title, Content) AGAINST ('home') AS Relevance, NULL AS CanViewType FROM "File" WHERE (MATCH (Filename, Title, Content) AGAINST ('home*' IN BOOLEAN MODE) AND ClassName = 'File') ORDER BY Relevance DESC LIMIT 0, 3 Can't find FULLTEXT index matching the column list
Line 536 of MySQLDatabase.php
* MySQLDatabase->databaseError(Couldn't run query: SELECT ClassName, "SiteTree_Live".ID, ParentID, Title, MenuTitle, URLSegment, Content, LastEdited, Created, _utf8'' AS Filename, _utf8'' AS Name, MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home') + MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home') AS Relevance, CanViewType FROM "SiteTree_Live" WHERE ( MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home*' IN BOOLEAN MODE) + MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home*' IN BOOLEAN MODE) AND ShowInSearch <> 0) AND ("SiteTree_Live"."Locale" = 'en_US') UNION SELECT ClassName, "File".ID, _utf8'' AS ParentID, Title, _utf8'' AS MenuTitle, _utf8'' AS URLSegment, Content, LastEdited, Created, Filename, Name, MATCH (Filename, Title, Content) AGAINST ('home') AS Relevance, NULL AS CanViewType FROM "File" WHERE (MATCH (Filename, Title, Content) AGAINST ('home*' IN BOOLEAN MODE) AND ClassName = 'File') ORDER BY Relevance DESC LIMIT 0, 3 | Can't find FULLTEXT index matching the column list,256)
Line 134 of MySQLDatabase.php
* MySQLDatabase->query(SELECT ClassName, "SiteTree_Live".ID, ParentID, Title, MenuTitle, URLSegment, Content, LastEdited, Created, _utf8'' AS Filename, _utf8'' AS Name, MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home') + MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home') AS Relevance, CanViewType FROM "SiteTree_Live" WHERE ( MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home*' IN BOOLEAN MODE) + MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home*' IN BOOLEAN MODE) AND ShowInSearch <> 0) AND ("SiteTree_Live"."Locale" = 'en_US') UNION SELECT ClassName, "File".ID, _utf8'' AS ParentID, Title, _utf8'' AS MenuTitle, _utf8'' AS URLSegment, Content, LastEdited, Created, Filename, Name, MATCH (Filename, Title, Content) AGAINST ('home') AS Relevance, NULL AS CanViewType FROM "File" WHERE (MATCH (Filename, Title, Content) AGAINST ('home*' IN BOOLEAN MODE) AND ClassName = 'File') ORDER BY Relevance DESC LIMIT 0, 3,256)
Line 126 of DB.php
* DB::query(SELECT ClassName, "SiteTree_Live".ID, ParentID, Title, MenuTitle, URLSegment, Content, LastEdited, Created, _utf8'' AS Filename, _utf8'' AS Name, MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home') + MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home') AS Relevance, CanViewType FROM "SiteTree_Live" WHERE ( MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home*' IN BOOLEAN MODE) + MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('home*' IN BOOLEAN MODE) AND ShowInSearch <> 0) AND ("SiteTree_Live"."Locale" = 'en_US') UNION SELECT ClassName, "File".ID, _utf8'' AS ParentID, Title, _utf8'' AS MenuTitle, _utf8'' AS URLSegment, Content, LastEdited, Created, Filename, Name, MATCH (Filename, Title, Content) AGAINST ('home') AS Relevance, NULL AS CanViewType FROM "File" WHERE (MATCH (Filename, Title, Content) AGAINST ('home*' IN BOOLEAN MODE) AND ClassName = 'File') ORDER BY Relevance DESC LIMIT 0, 3)
Line 833 of MySQLDatabase.php
* MySQLDatabase->searchEngine(Array,home*,0,3,Relevance DESC,,1)
Line 120 of SearchForm.php
* SearchForm->getResults(,Array)
Line 49 of Page.php
* Page_Controller->results(Array,SearchForm,SS_HTTPRequest)
Line 296 of Form.php
* Form->httpSubmission(SS_HTTPRequest)
Line 134 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 152 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
* Controller->handleRequest(SS_HTTPRequest)
Line 199 of ContentController.php
* ContentController->handleRequest(SS_HTTPRequest)
Line 67 of ModelAsController.php
* ModelAsController->handleRequest(SS_HTTPRequest)
Line 283 of Director.php
* Director::handleRequest(SS_HTTPRequest,Session)
Line 127 of Director.php
* Director::direct(home/SearchForm)
Line 127 of main.php
I am running on a site with multiple locales defined (Croatian, German, and English). From my guess, it appears that a field or index is missing. I have run /dev/build on the site as well as refreshing the browser cache and doing a flush. Our search form is a barely modified version from the SilverStripe book, section 11.4. Any help would be appreciated.