Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search form template name includes name space #1620

Closed
pandauxstudio opened this issue Sep 21, 2016 · 4 comments
Closed

Search form template name includes name space #1620

pandauxstudio opened this issue Sep 21, 2016 · 4 comments

Comments

@pandauxstudio
Copy link

When loading search,, I get the following error:
[User Warning] None of the following templates could be found: Array ( [0] => SilverStripe\CMS\Search\SearchForm [1] => SilverStripe\Forms\Form ) in themes "Array ( [0] => myThemeName [1] => $default ) "

Resolved this by creating an override template:
~/project/themes/projectTheme/templates/SilverStripe/Forms/Form.ss

Also had to override form attributes in new template from:

<form $FormAttributes>

To:

<form id="SearchForm" action="/home/SearchForm" method="get" enctype="application/x-www-form-urlencoded" class="ng-pristine ng-valid">

As ID and action included name space.
Also, no indication in docs (https://docs.silverstripe.org/en/4.0/tutorials/site_search/) of a different way of enabling basic full text search.

@pandauxstudio
Copy link
Author

@sminnee sminnee changed the title Search form template name includes name space Update docs for SS4 to show how to create a Search form template Sep 23, 2016
@sminnee
Copy link
Member

sminnee commented Sep 23, 2016

Namespaces are part of SS4, so this isn't a bug, but the docs need updating.

@sminnee sminnee changed the title Update docs for SS4 to show how to create a Search form template Search form template name includes name space Sep 23, 2016
@sminnee
Copy link
Member

sminnee commented Sep 23, 2016

Sorry, I misunderstood the original bug report.

I can't replicate this in the current master branch. We're releasing 4.0.0-alpha2 very soon, can you see if this works there?

@pandauxstudio
Copy link
Author

@sminnee yes you're right latest build (4.0.0-alpha2) fixed my issue thanks.
I ended up getting rid of my template override (~/templates/SilverStripe/CMS/Search/SearchForm.ss) which is great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants