hotosm / hotosm-website

The website of the Humanitarian OpenStreetMap Team. See instructions below for writing blog posts or updating your profile.
https://www.hotosm.org
66 stars 99 forks source link

Search results #403

Closed jessbeutler closed 5 years ago

jessbeutler commented 5 years ago

Clicking on the 'Search' icon opens the search window. However, no results appear when typing in the search box.

Tested on: multiple pages throughout the website via Chrome browser & iOS Safari

smit1678 commented 5 years ago

Thanks for flagging @jessbeutler, I just replicated on Firefox. We will dig into this.

humanitarian openstreetmap team home 2019-01-31 08-46-55

cc @arunasank @dakotabenjamin

dakotabenjamin commented 5 years ago

This doesn't show up in a local build- which is probably why we didn't catch the error.

The unrecognized expression error is an unrelated issue that should be addressed elsewhere: https://github.com/hotosm/hotosm-website/commit/3d31689fa609ce8d3984de75bcb8520530c7c711 (edit: maybe its not unrelated)

maybe something is going on with the deployment?

smit1678 commented 5 years ago

Maybe this is due to Github's Jekyll version or whitelabeled plugins?

dakotabenjamin commented 5 years ago

The error is there's malformed json if you open the search file you get this error: SyntaxError: JSON.parse: bad control character in string literal at line 2775 column 99 of the JSON data. Which is this section:

{
"type":"News",
"title":"2019 HOT Microgrants Program: empowering local OpenStreetMap communities",
"summary":" HOT invites communities to submit their applications for the 2019 Microgrants program.
",
"subtitle":"Rebecca Firth, Jessica Bergmann",
"url":"https://www.hotosm.org/updates/2019-hot-microgrants-program-empowering-local-openstreetmap-communities/",
"date":"2019-01-25 21:43:00 +0000"
} ,

There's a trailing newline in the summary. I've scrubbed that in siteleaf and will filter out newlines in the search file generator.

smit1678 commented 5 years ago

Fixed. Nice work @dakotabenjamin.