Skip to content
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

version switcher AJAX not working on RTD #844

Closed
drammock opened this issue Jul 26, 2022 · 1 comment
Closed

version switcher AJAX not working on RTD #844

drammock opened this issue Jul 26, 2022 · 1 comment

Comments

@drammock
Copy link
Collaborator

drammock commented Jul 26, 2022

foo.webm

Expected behavior is that when a page doesn't exist for a specific docs version, we redirect to the homepage for that version. Seems like maybe the RTD "maze found" page is fooling our AJAX into thinking that a page does exist there? Except that once in a while, it does work as expected. I haven't figured out whether it's intermittent (some kind of race between our AJAX and RTD's maze-finding logic?) or systematic (only works on some pages / some versions).

@coretl
Copy link

coretl commented Sep 7, 2022

This is not working for me either when the 404 page is on GitHub pages. I did a bit of digging, and found that
https://github.com/pydata/pydata-sphinx-theme/blob/main/src/pydata_sphinx_theme/assets/scripts/index.js#L327 is meant to install checkPageExistsAndRedirect as a click handler on item in the dropdown box, but putting a console.log() at the top of checkPageExistsAndRedirect showed it wasn't run. Inspecting in firefox shows a click handler on the top level drop down, but not the items. Inspecting in chrome shows many click handlers for each item, but it still doesn't fire checkPageExistsAndRedirect. At this point my javascript debugging skills fail me, so I'll leave it to someone who might know more about this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants