Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Simplesearch not working?

Started by Muut Archive 11 years ago · 16 replies · 912 views
11 years ago

Hi Guys,

Have just launched this website http://www.absolutemaintenanceandcleaning.com.au/ and it seems the search function doesn't want to work. Noticed that it's also not working on the skeleton demo.

I've looked through the documentation and have tried lots of different variations of the 'route' but just can't seem to get it to work. Am I going crazy or am I just doing something stupid to make it not work?

Thanks in advance....loving working in this system!

11 years ago

So it does....sorry about that!

If I only have pages on the site (no blog)
Should I be adding references to all the pages like

category: about
category: services
category: contact

Or just adding / as the category?

11 years ago

Before you answer that let me read up about the taxonomy and headers and see if I can figure it out for myself :-)

11 years ago

Well to be honest I'm not sure it works on regular pages. I tested it and it's not returning any results. Might ask creator of the plugin if search works on something more than blog posts.

11 years ago

Ahh....ok.....see here I was thinking I was slowly going crazy!

11 years ago

Looks like I have it partly working....however it's only bringing back one result - the homepage.

I've set up taxonomies: [category,tag,page] in the site.yaml and then added

filters:
category: page

to the simplesearch.yaml file

Then I went into each page and added
taxonomy:
category: page

Seems that it's picking up the homepage but nothing else. Perhaps I need to wait for the cache to empty? Although I have installed cachebuster and also deleted everything in cache manually.

11 years ago

Going to be a crazy busy day today but I'll look at this when I get a free moment.

What would help immensely is if you could send me a link to zip dump if your entire site. That way I can replicate it and debug your content exactly. Can send me the link in a PM on Gitter.im if you like.

11 years ago

No problem....will get that organised for you today

11 years ago

Ok - I think I have it working however there's a few things that I've picked up in the process.

Search Facility
It seems that the search box is only searching page titles. If you search for something that's within the content of a page this won't be picked up. Is there a setting or config that can change this as the content really needs to be crawled and supplied in search pages.

Can't re-search on search page
I've noticed that you can't actually re-search when you're on a search page. This happens with both the search box at the top of the site (in the deliver template) and also the larger search box in the content area. Not sure if this is a bug or done by design?

Menu doesn't work on search page in mobile view
I've noticed that the hamburger menu doesn't want to work in mobile view on the search page. This kind of leaves people stuck if they don't get a page they want from a search query as they can't re-search and can't click on the menu...just click back or the logo to go to the homepage.

In future for bugs like this do you want them posted in the forum or would you prefer them to be added to the Git tracker thingy? (haven't used that yet so will have to look into it :-)

11 years ago

Definitely add it as a bug :) Thanks ! :)

11 years ago

Most of those issues/questions can be resolved in the Deliver theme itself. Overrides for the simplesearch templates can be edited to provide the functionality you are looking for. I think Karol is on the case :)

11 years ago

I'm having a similar problem using the "multilang-site" skeleton, with no modifications other than the SimpleSearch partial added to the base.html.twig file. The pages for the multilang-site skeleton are all marked as "blog" in their taxonomies by default, but I'm getting 0 results on the search results page. I think I'm missing something?

11 years ago

i'll take a look when i get a minute this weekend.

11 years ago

Just checked RTFM skeleton on the demo and search is working fine.

Also it works in the Blog Skeleton demo

These are linked to the latest develop branches in GitHub and not the actual released version. There has been a few updates that warrant a re-release of simplesearch plugin and learn2 theme.

Susan, maybe try the version of simplesearch in the develop branch of github: https://github.com/getgrav/grav-plugin-simplesearch

11 years ago

Actually simplesearch 1.2.7 has the latest fixes. I've just not updated the blog and rtfm skeleton with this version yet.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1332 9 years ago
Archive · by Muut Archive, 9 years ago
2 923 9 years ago
Archive · by Muut Archive, 9 years ago
2 4053 9 years ago
Archive · by Muut Archive, 9 years ago
1 2931 9 years ago
Archive · by Muut Archive, 9 years ago
3 1109 9 years ago