Not sure what is happening but
{% set searchQuery = craft.request.getParam('q') %}
Does not seem to be working at all on a different server than staging. Anyone seen this before? Any ideas what could be preventing getParam from working? Here is what the end of my url looks like with the param: results?q=test
I then later try to display the search parameter like.
<h1 class="text-uppercase">Search Results {{searchQuery}}</h1>
But it only displays Search Results leaving the parameter empty... and my search results seem to be returning everything since it is basically doing a wildcard search since I'm using this below to query the matching results...
{% paginate craft.entries.search(searchQuery).order('score').limit(10) as entries %}
Everything works as expected on staging server.
getParam
is the issue? What happens if you{{ searchQuery }}
immediately after{% set searchQuery = craft.request.getParam('q') %}
? Does it outputtest
?.htaccess
rewrite rule that's dropping query strings?