textpattern / textpattern.github.io

Textpattern CMS user documentation.
https://docs.textpattern.com
GNU General Public License v2.0
15 stars 17 forks source link

Search is broken on macOS/Safari 15 #192

Open petecooper opened 2 years ago

petecooper commented 2 years ago

STR: search docs site for anything, no results are shown. For example:

https://docs.textpattern.com/search/?q=form

macOS/Safari 15.0 shows the following console log:

[Error] QuotaExceededError: The quota has been exceeded.
    setItem (search.js:1:119221)
    (anonymous function) (search.js:1:119221)
    i (search.js:1:28112)
    fireWith (search.js:1:28876)
    l (search.js:1:79576)
    (anonymous function) (search.js:1:82019)

Likely fixable with https://github.com/textpattern/textpattern.github.io/issues/162 but if we can bodge something in the meantime, that would be super.

philwareham commented 2 years ago

Works in Chrome and Firefox, broken in Safari 15. Will see if upstream project that provides the search JS has any reported issues.

philwareham commented 2 years ago

No issues at upstream project, but to be honest that project has been abandoned for a number of years.

Worth consideration: https://github.com/christian-fei/Simple-Jekyll-Search

I don't have time to implement until at least w/c 1st November. If someone else wants to try a fix, then by all means have at it.

Also, would be nice to get the self-hosted site up in the near future and end our reliance on GitHub Pages.

petecooper commented 2 years ago

would be nice to get the self-hosted site up in the near future and end our reliance on GitHub Pages.

Agreed. On my roadmap when I have time, hopefully sooner rather than later.

jools-r commented 2 years ago

I wanted to mention this too. Likewise QuotaExceededError: The quota has been exceeded in Safari 15 and still working on Brave (i.e. Chrome).

philwareham commented 2 years ago

Will try to fix on Monday, can spare an hour that day.

jools-r commented 2 years ago

May I nudge on this one too?

philwareham commented 2 years ago

Yeah, I can't fix this without the Jekyll site being self-hosted. Basically, Lunr.js tries to build the search using LocalStorage but because the site is quite large it's exceeding Safari's default local storage limit.

If the site were self-hosted, we could use a proper Ruby plugin to achieve search.

petecooper commented 2 years ago

I have issues with getting it to rebuild non-interactively, I am working on it.

petecooper commented 2 years ago

Docs site is now self-hosted.

jools-r commented 12 months ago

Could I nudge this one once more? It looks like you've added the packages and that the site is now self-hosted. I guess a puzzle piece is missing?

philwareham commented 12 months ago

@petecooper Hi Pete, I assume we use the self-hosted branch for development now (for the self hosted docs on our own server)?

philwareham commented 12 months ago

For investigation: https://www.algolia.com/developers/code-exchange/integrate-jekyll-with-algolia/

philwareham commented 12 months ago

TBH Jekyll seems fair dead nowadays. I guess we could look at Eleventy or just bring the docs into a Textpattern installation itself - don't know how we could maintain user editable pages on GitHub along with Textpattern database though?

petecooper commented 12 months ago

There's an issue somewhere (don't ask where) that I have to track viability of docs hosting on a docs-centric, non-GitHub service…I need to find it, and I'll link it, and we'll make it happen…it's been a while, so I'll go searching.

Getting Textpattern docs into Textpattern in a non-kludgy, maintainable way is a whole heap of work, and I'm inclined to use a reputable service with good search, being mindful of the huge amount of work @wion & @Bloke put into docs (and not undoing that).

Textpattern isn't the right platform for our docs, at least not in the sense that it can plug into GitHub and maintain syncing, we're not there yet. There's no shame in using other tools, we're progressive enough to avoid NIH syndrome, and if it lets us divert energies into core then that's a heavy tick in the box from me.

petecooper commented 4 months ago

Tagging https://github.com/textpattern/textpattern.github.io/issues/212