-
Notifications
You must be signed in to change notification settings - Fork 297
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
Redirecting to homepage broken for version switcher #1343
Comments
cc @stefanv |
is it related to #932 ? |
note that for our theme it's expected as there were no "example" section in v0.9 (see: https://pydata-sphinx-theme.readthedocs.io/en/v0.9.0/index.html) |
I don't think this is a duplicate of #932, though it might be related. #932 describes behavior that happens on the root of v0.8.0, while this issue pertains to the switchers behavior on subpages.
Precisely. The fact that v0.9 doesn't have an example section is why we can see the supposed bug in action. The cited part from the doc pertains to the behavior of the version switcher if the switched-to version doesn't have a corresponding equivalent of the current subpage. |
the code dealing with this is store here: pydata-sphinx-theme/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js Line 289 in dbab287
I tried to reproduce the configuration in of v0.9 in a codepen (https://codepen.io/12rambau/pen/RwqwdvV) and it should return the correct homepage. My best guess is that the location is not updated and the event returns the original url whatever the reult of the fetch test. As I'm no js expert I need to continue investigate. |
related to #844 |
Hey, thanks for trying to addressing this. I just tried to test the fix with the approach described below, and it seems like it still doesn't work?
git clone https://github.com/scikit-image/scikit-image.git
cd scikit-image
pip install -r requirements.txt -r requirements/build.txt
Subject: [PATCH] Update pydata-sphinx-theme to rev e8d1e68
---
Index: pyproject.toml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/pyproject.toml b/pyproject.toml
--- a/pyproject.toml (revision a20870ee582f844482096e2edff65fa9e511213c)
+++ b/pyproject.toml (date 1687369797918)
@@ -101,7 +101,7 @@
'kaleido',
'scikit-learn>=0.24.0',
'sphinx_design>=0.3',
- 'pydata-sphinx-theme>=0.13',
+ 'pydata-sphinx-theme @ https://github.com/pydata/pydata-sphinx-theme/archive/e8d1e689105dd135762a021821f8348845c38172.zip',
]
optional = [
'SimpleITK',
Index: requirements/docs.txt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/requirements/docs.txt b/requirements/docs.txt
--- a/requirements/docs.txt (revision a20870ee582f844482096e2edff65fa9e511213c)
+++ b/requirements/docs.txt (date 1687369796044)
@@ -17,4 +17,4 @@
kaleido
scikit-learn>=0.24.0
sphinx_design>=0.3
-pydata-sphinx-theme>=0.13
+pydata-sphinx-theme @ https://github.com/pydata/pydata-sphinx-theme/archive/e8d1e689105dd135762a021821f8348845c38172.zip
spin docs
I am not sure whether there it makes a difference that I am accessing the site on the local file system instead of some server. |
darn, yeah, I was afraid that #1350 would not be enough. |
Note that I'm also super sade ;-) (sorry I'm no javascripts expert, it's try and error process here) |
Removing the |
The documentation for the version switcher states
I think I discovered at least two cases where this doesn't seem to work:
We might have some wrong configuration but finding this issue on your website as well leads me to believe that this may actually be a bug?
The text was updated successfully, but these errors were encountered: