Soil Nice Search Url Gives 404

Hi! Soil works great and creates a nice URL for search requests from my form.

However, the search URL does not work by itself, as in I can’t just view a search page without a query.

I see the same problem on the roots example project:
This works because hello is the query
This doesn’t work and gives a 404 because it has no query

1 Like

Hey @tastet, thanks for the report! I forgot this has been reported before in the past, too

I will take a look at what we can do to improve this experience

Great! In our case, we need the search page to actually show because we use Algolia and let people do an advanced search from there. I think others, like in the link you showed, prefer a redirection to the home page.

For now, I’m going to see if adding a rewrite_url for that specific link /search/ would work or if I need to create an actual page with that permalink. The latter might be problematic with Soil, tbd!

1 Like

Actually, I’ve been doing some tests and this bug is not linked to Soil, since I have the same error with Soil turned off.

It comes from Polylang and its translated slugs on the Pro version. Will share a solution, if I find one!

1 Like

So my solution to this was to turn off Soil/nice-search and only use the ?s search argument as Polylang redirects an empty search url to a 404 page so it’s impossible to use the search template as is.

This topic was automatically closed after 42 days. New replies are no longer allowed.