azure-sdk-for-c
azure-sdk-for-c copied to clipboard
Docs redirect fails if page doesn't exist between versions
Repro:
- 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
- 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
This same problem exists in other languages docs such as .net's
https://github.com/Azure/azure-sdk/issues/1668 tracks the general fix for this. We should pull in the solution that gets used here.
Looks like there's a fix for this in .NET. Will check in on how this can be ported to other languages.
Working on c docs. Currently, the dropdown only listed one version. Will take a look on it.
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.