Forum

Thread tagged as: Question, Runway

Perch Search Runway Route...

my search results page is set up and working in Runway...

I can see search results when I pass in /search-results/whatever...

the form is passing in /search-results?q=whatever and I'm getting a 500 error...

In routing for the page, I have 2 routes set: search-results/[:q] search-results?=[:q]

I can only figure out how to pass in the /search-results/whatever...

how can I get /search-results?q=whatever to display results and not a 500 error?

Monty Lewis

Monty Lewis 2 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

What is the actual error you are getting? Check your error log.

I'm not getting an error in the error log :(

Rachel Andrew

Rachel Andrew 394 points
Perch Support

There will be an error somewhere, we can't help unless we have enough information to help. So you'll need to do some troubleshooting until you get to a point where we can see if Runway is involved at all.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Sounds like you have a problem with your error logging. See if the information here helps:

https://www.smashingmagazine.com/2011/11/a-guide-to-php-error-messages-for-designers/

Thanks for that guidance.

Shoot. I set up php error logging and determined that it was logging errors...

However, when I try and load '/search-results?q=help', it's not resolving and I do not get an error in my php.log...

What should the route be for '/search-results?q=help' to be be read as '/search-results/help'?

Drew McLellan

Drew McLellan 2638 points
Perch Support

The query string isn't part of the path, so the route would just be search-results

I guess I'm not using the right terminology or I'm completely missing the point. Sorry if this seems from left field, but I can't figure it out.

if the incoming url looks like this:

'/search-results?q=help'

what should the url pattern be to get this:

'/search-results/help'

Drew McLellan

Drew McLellan 2638 points
Perch Support

search-results/[slug:q]

But I wouldn't do that. I would stick with the original query string - this is literally a query.

ok, cool. thank you!