Can't search from https://perldoc.perl.org/perl.html (or other pages with no '/' in the path)
Closed this issue · 2 comments
cxw42 commented
Bug
Environment: Chrome 79 x64, Win7 x64. I tried this in both a normal window and an incognito window.
Steps:
- Visit https://perldoc.perl.org/perl.html or https://perldoc.perl.org/perlintro.html
- Type
sprintf
in the search box - Hit Enter
Expected: Search results for sprintf
Observed: The page does nothing
Explanation
The browser console shows this on page load:
main.min.js:3 GET https://perldoc.perl.org/perlintro.html/search.json 404
(anonymous) @ main.min.js:3
Promise.then (async)
(anonymous) @ main.min.js:3
main.min.js:3 Uncaught (in promise) SyntaxError: Unexpected end of JSON input
at main.min.js:3
It looks like main.js can't handle pages that don't have two levels of indirection. E.g.,
https://perldoc.perl.org/5.30.0/perl.html <-- works - requests /search.json
https://perldoc.perl.org/perl.html <-- doesn't work - requests /perl.html/search.json
Thanks in advance for fixing this!
cxw42 commented
Ah - sorry! Yes, this is a duplicate of #74. However, PR OpusVL/perldoc.perl.org-engine#13 is now open :D .