Closed Ares-X closed 1 year ago
Could u make it in Sandbox or ur site where it can be reproduced? Due to the console err, it seems not clearly.
here is my website https://ares-x.com/wiki/ password: qaxniubi open some page and wait a while , search will not working
Modify the search plugin to search.js
. Don't use min
so we can check for errors!
Change the path to English and try again. https://ares-x.com/wiki/_sidebar.md
Refer to docsify's sidebar document. https://docsify.js.org/_sidebar.md
According to the console information, I doubt that your files of ur site r too much to be stored in the LocalStorage
as search.index
. 😅
Could you remove the most of contents and hv a test again. Waiting for ur feedback.
According to the console information, I doubt that your files of ur site r too much to be stored in the
LocalStorage
assearch.index
. 😅 Could you remove the most of contents and hv a test again. Waiting for ur feedback.
maybe that's true , this problem doesn't happened on my mac , seem like only effect windows or mobile device?
i delete a lot of contents , then work fine on windows device , so is there any way to solve this problem?
see https://github.com/docsifyjs/docsify/issues/1400#issuecomment-709657743
You can convert the path to English to reduce the occupation.
see #1400 (comment)
You can convert the path to English to reduce the occupation.
i don't think is chinese path cause this error, i have tried many time on local server ,it doesn't have any problem
i already changed search-min.js
to search.js
it seems like working correct now
I'm just suggesting, otherwise your url would be long.
thanks for help
Is the issue still exsit? I guess we need investigation more about it. Could u reset ur site to make the exception reproduciable? thx in advance. IIRC,the localstorage size is relatived to the browser, I m not sure what makes the difference on different OS. r they the same browsers which u used on Win and Mac? AFAIK, We havent a solution about it yet, actully, I guess we havnt thought about such a big content in docsify. 🤫
Is the issue still exsit? I guess we need investigation more about it. Could u reset ur site to make the exception reproduciable? thx in advance. IIRC,the localstorage size is relatived to the browser, I m not sure what makes the difference on different OS. r they the same browsers which u used on Win and Mac? AFAIK, We havent a solution about it yet, actully, I guess we havnt thought about such a big content in docsify. 🤫
after i changed search-min.js to search.js this problem seem doesn't exist
i used chrome on my mac and win , macos works fine ,but windows has this problem, and i also told my friend to try it ,use firefox and chrome on his windows device , he also have this problem
here is the old version to reproduce this bug
https://ares-x-github-io-41iddeg6s.vercel.app/wiki/ pass:qaxniubi
use chrome on windows open it , at the first time search won't have problem, click some page and wait a monment , open f12 console and try to search anything ,you will see those error i post before
after i changed search-min.js to search.js this problem seem doesn't exist
It seems weird. 😅
thx again, we will check it and make sure what happened actually.
cc @anikethsaha PTAL, I think there should have something needs be digged out.
by the way , ios device still have this problem after changed to search.js try here https://ares-x.com/wiki/ device: iphone 6s plus ios version: 13.7
after i changed search-min.js to search.js this problem seem doesn't exist
It seems weird. 😅
thx again, we will check it and make sure what happened actually.
cc @anikethsaha PTAL, I think there should have something needs be digged out.
yea....we need to have a look in it.
FYI. I increased the localstorage size 10 times larger and got the search.index
size ( 5411729
bytes, more than 5M).
weird, from which version this is happening ?
weird, from which version this is happening ?
IMHO, I think the problem since we set the search.index
in local storage.
As we all know, the browsers have default local storage size (about 5 M), and we stored all the markdown files strings as search.index
in local storage.
If the files strings r humongous (more than 5 M), we can't set it in the local storage and cause the search err aboved.
weird, from which version this is happening ?
IMHO, I think the problem since we set the
search.index
in local storage. As we all know, the browsers have default local storage size (about 5 M), and we stored all the markdown files strings assearch.index
in local storage. If the files strings r humongous (more than 5 M), we can't set it in the local storage and cause the search err aboved.
https://github.com/wzpan/hexo-generator-search
Maybe you can refer to this save all markdown file strings to a local xml file
window.$docsify = {
loadSidebar: true,
....
}
when loadSidebar
is true
, the search work again, and just the content was indexed in side bar's reference.
If the content not in side bar‘s reference, they can't be searched.
So strange.
In my project, record it. https://anilople.github.io/find-spirit/#/
@Anilople You mean you can't search there?
This one? If so, then it's fixed.
@sy-records
Yes.
Let me give more example.
fixed via #1391
fixed via #1391
My docsify version is 4.11.6
Found that there is no code describe like #1391 in my docsify/lib/plugins/search.js file. So the problem occur.
Yes, the official version has not been released yet. You can try to build it yourself.
mengsanit168@gmail.com
@sy-records I noticed you cited a fix, and this issue is still open. I am getting a set of errors that appear extremely similar to those of this issue:
docsify.min.js:1 Docsify plugin error TypeError: Cannot read properties of null (reading '/')
at VM6904 search.js:347:17
... lots more
VM6904 search.js:208 Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at search (VM6904 search.js:208:12)
at doSearch (VM6904 search.js:402:18)
at VM6904 search.js:440:49
Loading in the bare search.js
and poking around, the error stems from these lines:
Object.keys(INDEXS).forEach(function (key) {
data = data.concat(Object.keys(INDEXS[key]).map(function (page) { return INDEXS[key][page]; }));
});
INDEXS
is null
for some reason.
I've tried multiple paths
configurations and inspected many of the awesome-docsify sites and can't spot any real differences with my setup here: https://github.com/CircArgs/cppfront
Any help would be greatly appreciated! Thank you
@CircArgs I didn't reproduce your question. If you're using GitHub Pages, you should try setting basePath: 'cppfront'
If you still have problems you can resubmit a new issue instead of replying here and I will close this.
@sy-records Thanks for trying! I was testing on Brave. It seems it was a permission issue. Worked on Chrome. Thanks again.
Bug Report
Steps to reproduce
fist time open docsify website , search plugin is working correct , after click some page , search-min.js throw error ,and search plugin not working any more , type something to search won't get any thing response
What is current behaviour
when open some page
type something to search
What is the expected behaviour
Other relevant information
[ ] Bug does still occur when all/other plugins are disabled?
Your OS:
Node.js version:
npm/yarn version:
Browser version:
Docsify version: newest
Docsify plugins: search
Please create a reproducible sandbox
Mention the docsify version in which this bug was not present (if any)