getgrav / getgrav/grav-plugin-simplesearch

Self-Controlled Page configuration doesn’t work: it always display results even before launching a search

Open
#197 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
46
Forks
55
Avg merge
5h 44m
Merged PRs (30d)
1

Description

Hi,

I have a simple blog page, where I have added a simplesearch header as described on the doc:

```
title: Blog
content:
items: '@self.children'
limit: 5
order:
by: date
dir: desc
pagination: true
url_taxonomy_filters: true
simplesearch:
process: true
route: '@self'
filters:
- '@self'
filter_combinator: and
```

And now when I go on the blog page, I no longer have the list of my articles but the display of the results (which is empty because I did not launch a search).
I see in the debug bar that simpleearch_result is called: `info Routed to page /blog (type: simpleearch_results)`.
If I understand what is written in the doc, it is the blog template that should be called instead, even if a search is launched from this page (and in this case the collection is replaced by the search results).

I’m using Grav v.1.7.7 and SimpleSearch v2.2.1 (with default settings)
Reproduced with grav skeleton onepage site

(problem reproduced at least by another person, see the forum thread here: https://discourse.getgrav.org/t/simplesearch-self-controlled-page-configuration-doesnt-work-it-always-display-results-even-before-launching-a-search/16408 )

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.