Search filters given as URL parameters don't clear when page is reloaded

  • gejones384
2 years 2 months ago #6533 by gejones384
I posted about this a few days ago in the Questions section, but now realise I probably should have put it in this section instead - apologies.

I've noticed that if I use URL parameters to filter the results on a catalog page, if I then revisit the page without the search parameters included in the URL, the results are still filtered based on the same parameters.

Working example from one of the Showcase websites (I guessed the searchfield name):

1. View all results
rcaf.museum/visit/coldwar-museum/virtual-memorial

2. View only results with surname "Abbott"
rcaf.museum/visit/coldwar-museum/virtual-memorial?search=Abbott&searchfield=lastname

3. Try to view all results again - but this view is still filtered to only show results with surname "Abbott"
rcaf.museum/visit/coldwar-museum/virtual-memorial

4. Explicitly clear search parameters - shows all results again, but it doesn't appear to be possible to set a URL containing '?' or '=' as the menu link URL
rcaf.museum/visit/coldwar-museum/virtual-memorial?search=

I noticed this behaviour on a website I'm building (Joomla 4.0.3), so thought I'd check the above Showcase website just to make sure I wasn't going crazy.

Does this happen for anyone else, and is there a fix for it? Alternatively is there a better way to filter results for the user other than using URL parameters?

Please Log in to join the conversation.

More
2 years 1 month ago #6538 by Dirk
JooDB stores all search parameter in the user session. It's a feature not a bug.

However you can reset the search by adding reset=true to the URL or sing javascript as link.
<a class="reset" href="Javascript:submitSearch('reset');void(0);">»All results</a>

Example
joodb.feenders.de/db-example.html?search=candy
Reset
joodb.feenders.de/db-example.html?reset=true

And make sure to update to the lateset version.

Please Log in to join the conversation.

More
2 years 1 month ago #6541 by gejones384
Is there any way I can disable this feature? I'd prefer to have all search results, unfiltered, shown by default when the user accesses the URL without search parameters.

As a side note, I've had to register a new account on this forum every day (same email, username etc), even after activating my account using the activation email every time. I'm not sure why this is happening.

Please Log in to join the conversation.

More
2 years 1 month ago #6542 by Dirk
There is no such mechanism yor could try to use .htaccess and add a reset=true if someone loads the database without search parameter.

As a side note, I've had to register a new account on this forum every day (same email, username etc), even after activating my account using the activation email every time. I'm not sure why this is happening.


Because of to much spam forum posts are only visible if you posted 2 or more approved entries.
But we will use a different forum in the near future.

Please Log in to join the conversation.

Moderators: Dirkjoest