-
Notifications
You must be signed in to change notification settings - Fork 55
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 results path seems incorrect #149
Comments
you need to load the js. |
Where do I need to load the js?
and I don't want to load it inside the base file because I only want to load it when I need it. Why is this not mentioned in the documentation? |
The JS controls the search form. so any where you have the search bar you need the JS. I have not searched to find out why it does not loading from the plugin. (line 300 in simplesearch.php). but I loaded it in my "base.html.twig" file in the assets block.
|
Putting line to do assets does not help me. Only function variant for me is to have script and input field together: <script src="/grav/user/plugins/simplesearch/js/simplesearch.js"></script>{% include 'partials/taxonomylist.html.twig' with {base_url: '/blog', taxonomy: 'tag'} %} |
I had the same issue I fixed my issue with search not working, when embedded in a page (it worked on its own, but not when the search form was embedded in a page). Bear in mind my fix applies to the Gantry5 Framework & Hydrogen theme, but it might work for you. The issue was that the Javascript was not loading. I change the page.html.twig template to include this piece of code on line 65 {%- do gantry.document.addScript(url('/DxChange/user/plugins/simplesearch/js/simplesearch.js'), 11, 'footer') -%} This results in the javascript being loaded in the HTML (check the code source) near the footer <script src="/DxChange/user/plugins/simplesearch/js/simplesearch.js"></script>Subsequently the search works ! Et voila :-) PS: replace "DXChange" with your website name |
Greetings,
When I search I get no results. If I am on a page /this/page, and I use the search box, I get this page
https://server/this/page?searchfield=minim+veniam
and no results.
If I go to /search and search from there, I get this page
`https://server/search?searchfield=minim+veniam'
and no results.
If I enter
https:/server/search/query:minim veniam
I get a page with some results on it.I don't see where this path is set. I see it in the javascript file - and appears to be set on the form correctly.
Any help would be appreciated
The text was updated successfully, but these errors were encountered: