Jump to:

2012 Posts in 1438 Topics by 621 members

Form Questions

SilverStripe Forums » Form Questions » Search error on silverstripe 3.0

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 496 Views
  • Nobi
    Community Member
    5 Posts

    Search error on silverstripe 3.0 Link to this post


    I'm using SilverStripe 3.0 in my devel site http://www.rimantoro.com/jakpus2012

    Have problem with SearchForm. The search result have an error on Query, it's told "......Can't find FULLTEXT index matching the column list". I have search on API Doc for 3.0 and have no SearchForm documentation.

    I have set MyISAM & FulltextSearchable::enable(); in mysite config, below


    global $project;
    $project = 'mysite';

    global $databaseConfig;
    $databaseConfig = array(
       "type" => 'MySQLDatabase',
       "server" => 'localhost',
       "username" => 'xxx',
       "password" => 'xxx',
       "database" => 'xxx',
       "path" => '',


    // Set the current theme. More themes can be downloaded from
    // http://www.silverstripe.org/themes/

    // Set the site locale

    // Enable nested URLs for this site (e.g. page/sub-page/)
    if (class_exists('SiteTree')) SiteTree::enable_nested_urls();


    DataObject::$create_table_options['MySQLDatabase'] = 'ENGINE=MyISAM';


    And here is the Page.php :

    class Page extends SiteTree {

       public static $db = array(

       public static $has_one = array(

    class Page_Controller extends ContentController {

        * An array of actions that can be accessed via a request. Each array element should be an action name, and the
        * permissions or conditions required to allow the user to access it.
        * <code>
        * array (
        * 'action', // anyone can access this action
        * 'action' => true, // same as above
        * 'action' => 'ADMIN', // you must have ADMIN permissions to access this action
        * 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
        * );
        * </code>
        * @var array
       public static $allowed_actions = array (
       public function init() {

          // Note: you should use SS template require tags inside your templates
          // instead of putting Requirements calls here. However these are
          // included so that our older themes still work
          // Requirements::themedCSS('reset');
          // Requirements::themedCSS('typography');
          // Requirements::themedCSS('form');
       function searchform() {
          $fields = new FieldList(
             new TextField("Search", false)
          $actions = new FieldList(
             new FormAction('results', 'search')
          return new searchform(
       function results($data, $form) {
          $results = $form->getResults(null, $data);
          $searchQueryTitle = $form->getSearchQuery($data);
          $templateData = array(
             'Results' => $results,
             'SearchQueryTitle' => $searchQueryTitle,
             'Title' => 'Search Results'
          return $this->customise($templateData)->renderWith(array('Page_results', 'Page'));

    Did I'have something wrong ?


  • martimiz
    Forum Moderator
    1091 Posts

    Re: Search error on silverstripe 3.0 Link to this post

    Hi Nobi, welcome to the forums

    Before anything else - it's a lot of code to read - did you try to mydomain.xx/dev/build/?flush=1 after setting FulltextSearchable::enable(); ?


  • Nobi
    Community Member
    5 Posts

    Re: Search error on silverstripe 3.0 Link to this post


    This is my second time forget to dev/build

    Thanks, its work now.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.