-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem using direct links (live/prod only) #2190
Comments
Same error, the version is 2.0.0-alpha.40. |
Hmmm. Agreed that something is definitely going on with that RTK link, but it seems like only a few pages are being affected. I also tried it with a few Redux core docs pages like https://redux.js.org/api/combinereducers , and they seem to work okay. If I open that link, I do see the left sidebar very briefly, and then it hides itself. |
Root Cause Found
Help NeededI am no pro, especially when it comes to the server side of Docusaurus. Hopefully this is enough information for someone to chip in and help solve this problem ❤️ |
When you go to direct links, Docusaurus does not manage this (redirects, trailing slashes), this is a static site, so the requested URL is important here, these problems depends on hosting platforms you use. Try installing this package locally https://www.npmjs.com/package/serve, build a website and run the |
Thanks for explaining this @lex111, I will invest the time to make this clear/learn. It would be great if this is indeed a hosting issue (Netlify in this case). |
@lex111 thank you for helping us out here ❤️. Looking at this I guess the only real solution for Netlify users would be using lowercase ids. I will do some testing and if I can confirm, will propose a documentation PR advizing users to use lowercase ids to prevent issues with e.g. Netflify. |
@bravo-kernel although maybe this is still a D2 problem, since our blog entry looks similar - https://v2.docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus -> https://v2.docusaurus.io/blog/2018/04/30/how-i-converted-profilo-to-docusaurus/ (redirect by Netlify) And it works OK. I will try to do something with this, in the end we need to "simple" bring back the doc sidebar. But my personal opinion is that this kind of problem is the responsibility of the end-user (and its hosting provider). I do not promise, but I will try to do a workaround for this. (after all, I'm not pro either 😄) |
@bravo-kernel I have created PR #2235. This patch should show the doc sidebar when going to the wrong URL path. |
Copied from a Netlify notification email: Will this impact my SEO?No. Forwarding traffic to a new domain extension using a 301 redirect is a proven technique that search engines are well aware of. Your inbound links will not be affected. Your search engine rankings will not be affected. |
Confirmed as fixed in 2.0.0-alpha.41. Thanks @lex111 👏 |
Can you clarify what the actual fix is? I was seeing the issue with a Redux Toolkit alpha API page yesterday, and tried deploying Example link: https://deploy-preview-352--redux-starter-kit-docs.netlify.com/api/createEntityAdapter |
Are you sure you are running .41. In my case the above mentioned PR now adds the sidebar when netlify redirects https://docusaurus-powershell.netlify.com/docs/commands/New-DocusaurusHelp to https://docusaurus-powershell.netlify.com/docs/commands/new-docusaurushelp/ |
Hmm. I coulda sworn I did merge in Lemme check this again this evening and confirm. |
OK, I am seeing some issues with css not loading in the lowercase version atm but that could be my local browser. You might be able to reproduce if you open a new browser window and then pasting my lowercased URL https://docusaurus-powershell.netlify.com/docs/commands/new-docusaurushelp/ |
Not happening when opening a private window. |
Yeah, this does not appear to be solving the problem for the Redux Toolkit docs. Example as of right now, on https://deploy-preview-352--redux-starter-kit-docs.netlify.com/api/createAsyncThunk And the deployed To make things worse, |
@markerikson I just made a small fix and deployed your website, so everything should be OK https://hardcore-hermann-669593.netlify.com/api/getdefaultmiddleware/ |
@lex111 I can only speak for my own website but v43 solved all issues. Thanks for the quick fix 💯 |
This is still somehow not working right, at least on a specific PR branch. This version, from the PR that added .43, works fine: https://deploy-preview-369--redux-starter-kit-docs.netlify.com/api/getdefaultmiddleware/ I merged that PR to https://deploy-preview-352--redux-starter-kit-docs.netlify.com/api/getdefaultmiddleware/ Why are these not behaving the same? |
Scratch that last comment. I just tried clearing the Netlify cache and forcing a redeploy, and now, finally, the PR 352 preview link looks correct: https://deploy-preview-352--redux-starter-kit-docs.netlify.com/api/getdefaultmiddleware/
So, I'm going to claim this is indeed good to go now. Thanks for poking at this enough to fix things! |
Netlify users: make sure to disable |
Intro
It "looks like" there is a bug in production with direct links/routing(?).
Reproducable Error A
Problem 1: no left side-bar
Problem 2: uppercase Describe is being lowercased
Reproducable Error B
Problem: 404 error
Versions
Redux Toolkit uses v0.35 which also has the same problem.
Try browsing to this link https://redux-toolkit.js.org/api/getDefaultMiddleware.
Ping @markerikson
The text was updated successfully, but these errors were encountered: