Skip to content

Version selector shows latest version instead of the selected when the site is loaded via an alias #2235

@SaltyAimbOtter

Description

@SaltyAimbOtter
  • I've read the [contribution guidelines][1] and agree with them

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

  • ... the problem doesn't occur with the default MkDocs template
  • ... the problem is not in any of my customizations (CSS, JS, template)
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

The version selector shows the latest version if any alias is used to access the site.

Expected behavior

The version selector should show the currently loaded version of the documentation.

Actual behavior

The version selector shows "1.12.1-DEV" when opening the documentation using https://betonquest.github.io/BetonQuest/RELEASE/. The actual loaded site is 1.12.0 - the release. You can easily see that by looking at the left TOC. It contains emojis in 1.12.1-DEV.

Steps to reproduce the bug

  1. Create multiple versions using mike. E.g. 1.0, 2.0, 3.0
  2. Create an alias for 1.0. E.g. LEGACY
  3. Open the alias

Package versions

  • Python: 3.6
  • MkDocs: MkDocs 1.1.2 and mike 0.5.5
  • Material: mkdocs-material-6.2.4+insiders.1.15.0

Project configuration

https://github.com/BetonQuest/BetonQuest/blob/master/mkdocs.yml

System information

  • OS: Windows 10
  • Browser: Firefox & Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions