imagej / imagej.github.io

The ImageJ wiki
https://imagej.net
Other
25 stars 110 forks source link

Search is non-functional #225

Open mkitti opened 2 years ago

mkitti commented 2 years ago

As noted by @tpietzsch , search on the website is currently broken.

Consider jekyll resources here: https://jekyllrb.com/resources/#search

We seem to be setup for https://www.algolia.com/doc/api-reference/widgets/vue/

ctrueden commented 2 years ago

This was intended to document fiji.sc's non-functional search, right? The search on imagej.net is working for me.

With fiji/fiji.github.io@c63e16efcadf7494f93d5cbb38ae6649a6f2e8c4, I removed the fiji.sc search bar—at least for now.

The search on imagej.net is powered by TypeSense+InstantSearch.js, in case you were curious. See https://github.com/imagej/imagej.github.io/tree/main/_search for details. We tried various Jekyll-based search solutions, but they are all too limited for our needs. We want to index content beyond only the wiki, which the Jekyll-based search solutions would not be able to do.

mkitti commented 2 years ago

I may be confused, but the imagej.net search at the top of the page is also broken for me using Chrome and Firefox on Windows.

Uncaught TypeError: Cannot read properties of undefined (reading 'parentElement')
    at visitSelected (search-tweaks.js:43:30)
    at HTMLInputElement.searchInput.onkeydown (search-tweaks.js:91:29)
visitSelected @ search-tweaks.js:43
searchInput.onkeydown @ search-tweaks.js:91
Uncaught TypeError: Cannot read properties of undefined (reading 'click')
    at selectPage (search-tweaks.js:84:28)
    at HTMLDocument.<anonymous> (search-tweaks.js:106:31)
selectPage @ search-tweaks.js:84
(anonymous) @ search-tweaks.js:106
ctrueden commented 2 years ago

Ahh, thanks @mkitti, that is indeed a different issue, which I have not seen. I will check later today whether I am able to reproduce. Does it happen on all pages including the front page?

ctrueden commented 2 years ago

@mkitti I updated imagej.net to get rid of a couple of JS console errors that I noticed. Are you still seeing a non-working search bar? I tested on macOS and on Windows in Firefox, as well as Chrome on macOS, and I cannot reproduce the error. You might need to dig into the JS code yourself on the affected machine; it's likely something you can fix or work around in search-tweaks.js.

mkitti commented 2 years ago

I did a quick test, and it is still not working on Chrome or Firefox on Windows from Janelia. I will do a more extensive diagnostic.

ctrueden commented 2 years ago

@mkitti Maybe it's something with the Janelia firewall? That beast has caused problems with the ImageJ Updater in the past.