Fix SearchForm throwing a 404 on search

The GridFieldAddExistingSearchHandler search has been converted to namespaces however this causes the FormAction to be incorrect and when performing a search, currently throws an error. The form name does not need to be namespaced.
This commit is contained in:
Will Rossiter 2017-05-04 05:29:44 +12:00 committed by GitHub
parent 0907b2f493
commit 2c73b802d6

View File

@ -75,7 +75,7 @@ class GridFieldAddExistingSearchHandler extends RequestHandler
{ {
$form = new Form( $form = new Form(
$this, $this,
'SilverStripe\\CMS\\Search\\SearchForm', 'SearchForm',
$this->context->getFields(), $this->context->getFields(),
new FieldList( new FieldList(
FormAction::create('doSearch', _t('GridFieldExtensions.SEARCH', 'Search')) FormAction::create('doSearch', _t('GridFieldExtensions.SEARCH', 'Search'))