azure-sdk-for-c icon indicating copy to clipboard operation
azure-sdk-for-c copied to clipboard

Docs redirect fails if page doesn't exist between versions

Open danieljurek opened this issue 5 years ago • 4 comments

Repro:

  1. Go to https://azuresdkdocs.blob.core.windows.net/$web/c/docs/1.0.0-preview.1/md_sdk_platform_noplatform__r_e_a_d_m_e.html
  2. Click version dropdown and select "1.0.0-preview.3"

Expected: Changing the version sends you somewhere valid.

Actual: 404 page

Suggestion: Use XHR to check the redirecting location before visiting, if 200 change page location, if not, send to docs root

danieljurek avatar Jul 29 '20 20:07 danieljurek

This same problem exists in other languages docs such as .net's

RickWinter avatar Aug 10 '20 22:08 RickWinter

https://github.com/Azure/azure-sdk/issues/1668 tracks the general fix for this. We should pull in the solution that gets used here.

danieljurek avatar Aug 12 '20 18:08 danieljurek

Looks like there's a fix for this in .NET. Will check in on how this can be ported to other languages.

danieljurek avatar Jan 04 '21 18:01 danieljurek

Working on c docs. Currently, the dropdown only listed one version. Will take a look on it.

sima-zhu avatar Jan 12 '21 19:01 sima-zhu

This is an edge case though it affects all of our GithubIO docs. Since we haven't seen a lot of support issues related to this I'm closing. If this becomes a priority we can revisit.

danieljurek avatar Sep 12 '23 21:09 danieljurek