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

forked outdated version example is not working on firefox (the original is) #4283

Closed
5 tasks done
MartinRoth opened this issue Aug 26, 2022 · 3 comments
Closed
5 tasks done
Labels
needs reproduction Issue lacks a minimal reproduction .zip file

Comments

@MartinRoth
Copy link

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Hi,

as this i my first issue, I want to first thank you for the great work!

The outdated hint is not shown in a recent version of firefox.

As my issue is based on a fork of https://github.com/squidfunk/mkdocs-material-example-versioning and explicitly relies on the custom_dir, I consider the first bullets checked. Moreover, there are closed issues e.g. #3653, but to me it seems that the odd behavior is reintroduced.

Expected behaviour

The outdated hint should be shown.

Actual behaviour

The outdated hint should is not shown on firefox.

Steps to reproduce

To reproduce, I first forked the repo and then used pip-tools to get the latest versions of the requirements:

  • mike
  • mkdocs
  • mkdocs-material
  • mkdocstrings[python]

Which yield the following exact pins:

  • mike==1.1.2
  • mkdocs==1.3.1
  • mkdocs-autorefs==0.4.1
  • mkdocs-material==8.4.1
  • mkdocs-material-extensions==1.0.3
  • mkdocstrings[python]==0.19.0
  • mkdocstrings-python==0.7.1

If I follow now the instructions and push the documentation twice firefox is not able to show the outdated hint (chrome is). On the other hand my firefox version (91.12.0esr) is able to show the hint on the original webpage. So it's not only a browser issue, it could be dependent on specific versions of some packages.

If it's possible to obtain the original requirements, I could check this.

Package versions

  • Python: 3.7.5
  • MkDocs: 1.3.1
  • Material: 8.4.1

Configuration

# Project information
site_name: My Docs
site_url: https://squidfunk.github.io/mkdocs-material-example-versioning/
site_author: Martin Donath

# Repository
repo_name: squidfunk/mkdocs-material-example-versioning
repo_url: https://github.com/squidfunk/mkdocs-material-example-versioning
edit_uri: ""

# Configuration
theme:
  name: material
  custom_dir: overrides

# Customization
extra:
  version:
    provider: mike

System information

  • Operating system: wsl1 ubuntu 18.04 on windows
  • Browser: firefox 91.12.0esr
@squidfunk squidfunk added the needs investigation Issue must be investigated by the maintainers label Aug 26, 2022
@squidfunk
Copy link
Owner

Thanks for reporting. I can't reproduce the problem you reported. Please provide a fully self-contained minimal reproducible example that we can run and deploy, including a requirements file with all dependencies. Also, please provide the exact steps you ran to deploy your documentation with specific versions. You can provide this in the form of an external repository, or a zip file attached to this issue.

In the meantime, I'm closing this issue as not reproducible. The official versioning example works well, so it's not unlikely that it's a user error. If you manage to provide a complete reproduction, I'm happy to reopen and look into it.

@squidfunk squidfunk added needs reproduction Issue lacks a minimal reproduction .zip file and removed needs investigation Issue must be investigated by the maintainers labels Aug 27, 2022
@squidfunk
Copy link
Owner

squidfunk commented Aug 27, 2022

Okay, I think I know where this is coming from – it's important to understand that the flag whether the outdated banner is shown is persisted in session storage. Once this is done, the banner will be hidden or shown until you close the browser window and session storage gets reset. I suspect that you deployed the first version (e.g. 0.1), loaded it up, then deployed the second version (0.2) which should now trigger the display of the outdated version banner, but doesn't. If you close the window in between deployments, everything should work as expected.

At least it does for me on a newly deployed installation in Chrome as well as Firefox:

Bildschirmfoto 2022-08-27 um 11 51 03

@MartinRoth
Copy link
Author

Hi,

thanks a lot - this was indeed the problem. I tried to refresh the browser, but apparently not enough.

So thanks again for looking into it and the great work.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction Issue lacks a minimal reproduction .zip file
Projects
None yet
Development

No branches or pull requests

2 participants