Open asimakos opened 4 years ago
same issue for me :-)
I fixed my issue with search not working, when embedded in a page (it worked on its own, but not when the 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
Subsequently the search works ! Et voila :-)
PS: replace "DXChange" in the URL with your website name
same issue here
All suggested doesn't work. Reverting back to version 1.1.2 works.
Futher to the below, without gantry, just add the below line to the base.html.twig so the js loads: {% do assets.addJs('plugins://simplesearch/js/simplesearch.js', 98) %}
as below: {% block bottom %} {% do assets.addJs('theme://js/skel.min.js', 100) %} {% do assets.addJs('theme://js/main.js', 99) %} {% do assets.addJs('plugins://simplesearch/js/simplesearch.js', 98) %} {% do assets.addJs('theme://js/util.js') %} {{ assets.js() |raw}} {% endblock %}
I fixed my issue with search not working, when embedded in a page (it worked on its own, but not when the 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
Subsequently the search works ! Et voila :-)
I have integrated the search bar with glass button into my custom theme and applied the following config to /user/config/plugins/simplesearch.yaml:
Unfortunately when i search for a keyword it routes to http://myserver/?searchfield=energy results page is not routed properly and additionally it gives no results. I have also added simplesearch_results.html.twig into templates folder and simplesearch_searchbox.html.twig into templates/partials folder. Additionally i have not created any category or taxonomy at all in my blog! Any idea what i am missing?
Regards