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

Learn2 only searches current page

Started by Muut Archive 11 years ago · 10 replies · 702 views
11 years ago

The search function on learn.grav.com or the demos is really nice. For some reason I cannot get it to work.

I installed grav+ admin and then learn2 via gpm. I then added a few pages, sub pages and put them into categories, set them to published, etc.

Now when I search in the sidebar, it highlights the keyword on the page I'm currently on, however, it does not remove the pages that don't contain the keyword from the list in the sidebar.
I am probably missing something but I cannot find out what.
Thanks in advance, have a nice day!

11 years ago

Do you have caching off? This searching process could take a few seconds if you have caching disabled. It should be very fast with caching enabled however.

Also check your XHR requests in your "Network" tab of your Web Inspector. Here you can see if the AJAX calls are returning successfully.

11 years ago

Thank you very much for the quick reply. I will try that out.

11 years ago

The calls appear to return successfully. I also have caching enabled. I also tried installing the skeleton of the theme. It does search pages that come with it but not the ones that I created. I suppose it's something with the cache. I will try some different settings.

11 years ago

To be honest it's kinda hard to tell with just 1 chapter and 1 docs page. Maybe create some more pages?

Also the navigation arrows are not working on yours either. So maybe you didn't add the required:

YAML
taxonomy:
    category: docs

On all the pages???

BTW That would explain why everything is not working as expected. That taxonomy is needed to be set on all the pages and also defined in your user/config/site.yaml file.

11 years ago

You probably should start with the RTFM skeleton and remove the extra pages.. Then just add the admin plugin with bin/gpm install admin

11 years ago

Yay, it's working! This forum is amazing. Thanks so much!

10 years ago

I'm also experiencing the same issue. For some reason the search json only returns an array with one result "/". Anyone have any ideas. All pages have are category: docs and the filter is set to use that.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1357 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2955 9 years ago
Archive · by Muut Archive, 9 years ago
3 1121 9 years ago