CarmeloLabadie Posted October 23, 2021 Share Posted October 23, 2021 On a new install (copy of an absolutely fine-working PW) the search is not working. And it's really strange: same server, same PHP versions etc. The q parameter is not recognized by PHP. I tried to echo $_GET["q"] as well, but the var is empty. The search URL is just domain.tld/search/ - instead of domain.tld/search/?q=hello If I manually add the param in the URL: /search/?q=something, the search results are shown as expected. Error log doesn't show anything I also checked any .htaccess files, whether something else hijacks the q param for mod_rewrite - nothing Any ideas where to look further? Link to comment Share on other sites More sharing options...
BillH Posted October 24, 2021 Share Posted October 24, 2021 Welcome to the forums! I'd start by checking the search form, particularly as rendered in a browser. Does everything seem OK, and in particular, is the value of the 'action' attribute as expected for the search page? Another possible cause might be caching, so if caching is on for the search page I'd turn it off (Templates > name-of-search-template > Cache). And if you have any other sort of caching running, you could try with that turned off too. 1 Link to comment Share on other sites More sharing options...
brandmarker Posted October 25, 2021 Share Posted October 25, 2021 On 10/23/2021 at 8:07 PM, CarmeloLabadie said: Any ideas where to look further? Have you allowed URL segments in the template settings? Link to comment Share on other sites More sharing options...
BitPoet Posted October 25, 2021 Share Posted October 25, 2021 On 10/23/2021 at 8:07 PM, CarmeloLabadie said: The search URL is just domain.tld/search/ - instead of domain.tld/search/?q=hello If I manually add the param in the URL: /search/?q=something, the search results are shown as expected. Error log doesn't show anything Also, make sure that your search form and results template use the correct request method (GET vs. POST), as having "<form method='POST'>" in the HTML and reading $input->get->q in PHP would explain the behavior. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now