I am using the Gateway skeleton theme and noticed the search function is not working correctly when I am in the blog page. I get an error while performing a search query. If I am in a different page(about, contact, home,etc), the search returns a match. The issue I am noticing is that the url should return
’domain.com/search/query:text’
instead it is returning
’domain.com/blog/search/query:text’ which is a page not found.
Anyone knows how I can fix this?
I found the issue being in the Gateway theme, it was overwriting a variable in the blog / blog post twig: https://github.com/getgrav/grav-theme-gateway/commit/6981178eb81bdd1612fa0ecb745292d5280e55ed
If you download the latest Gateway theme package https://github.com/getgrav/grav-theme-gateway/archive/develop.zip you can try it, and confirm, then I’ll make a release of the theme.
Hi flaviocopes,
Sorry for the late reply. I didn’t redownload the gateway theme, but I did edited the files you have posted on a different thread and it works.
Spoke too soon. Now the categories doesn’t work. It needs the ‘blog/’ to return a hit.
‘domain.com/blog/category:text’
I have fixed the issue for category and tag links in the sidebar the way I know how. If there is a proper of doing it, please explain.
You will need to edit 2 files.
…/partial/categorylist.html.twig
Find line containing '
Add ‘/blog’ ,
…/partial/taxonomylist.html.twg
Find line containg '{{ tax|capitalize }} '
Add ‘/blog’, '{{ tax|capitalize }} ’
I verified that this theme v.1.2.0 add “/search” when it resolved. When you search it return http://www.drinkharder.com/home/blog/search/query:grav instead of http://www.drinkharder.com/home/blog/query:grav
@drinkharder
I am using the gateway skeleton theme. Yours is without the theme it appears. The search link url should not include the ‘blog’. Have you followed @flaviocopes suggestion link and edit the 3 files. That should take care of the simplesearch.