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
Versioning outdated banner and instant loading odd behaviour #3653
Comments
Thanks for reporting. Fixed in bcc2c18. Turns out the outdated version banner was not integrated with instant loading, an oversight when designing the outdated version banner in the first place. It should now work with and without instant loading. Could I ask you to test-drive both scenarios? If it now reliably works with and without instant loading, I can issue a bugfix release straight away. |
Thanks for looking into it so quickly! I will try this branch today and get back to you. I did mean to add that everything was working with instant navigation turned off, but I will make sure to test both methods. |
@squidfunk I can confirm that bcc2c18 has fixed this particular problem with the outdated banner in both cases. Though I decided to test the other issue I was having in my original discussion with the switching from a page that didn't exist in a previous version. I have deployed a version using that commit to here: https://ajstewart.github.io/mkdocs-material-version-test/. To deploy v1.0 I removed the Section B from the nav and renamed the On that deployed version, if you go to Section B "New" page on Should I create a separate issue for this? |
Thanks for testing. Yes, please create a separate issue. |
Just to say I created a clean deployment and now it seems ok. So I'll raise it if I meet it again on my actual docs website. Thanks again. |
Okay great. I've also double-checked the version navigation code and could see no apparent source of error, so the issue you were experiencing might be related to the latest fix. |
Released as part of 8.2.4. |
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
I'm creating this issue after asking the previous question found here in the discussions section: #3617
On further digging, I've found that when using the combination of mike versioning, outdated banner override and instant loading, the suggested outdated banner url does not work as expected.
To be clear, the suggested outdated banner is that below which is stated in the docs on https://squidfunk.github.io/mkdocs-material/setup/setting-up-versioning/#version-warning
This only happens when the initial load is performed on the homepage.
If you hard-refresh, or load in directly to a page, the banner link works throughout. It is only when the home page is the initial load.
I have created a simple example site (see reproducing section).
Expected behaviour
That when clicking the outdated banner the link should direct to the root address and therefore take you to the default latest version.
Actual behaviour
The current behaviour is that the outdated banner link is not resolving properly with instant loading when the homepage is the initial entry point. When visiting another page in the site after this entry point, the banner link will attempt to go to the wrong address and 404.
Steps to reproduce
I have created a simple dummy docs site hosted here: https://ajstewart.github.io/mkdocs-material-version-test/
Repository here: https://github.com/ajstewart/mkdocs-material-version-test
These were deployed with (both versions are the same):
v1.0
.Package versions
3.8.12
1.2.3
8.2.3
Configuration
The text was updated successfully, but these errors were encountered: