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

Edit and View Source buttons are the same #4813

Closed
4 tasks done
davelevine opened this issue Jan 3, 2023 · 3 comments
Closed
4 tasks done

Edit and View Source buttons are the same #4813

davelevine opened this issue Jan 3, 2023 · 3 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@davelevine
Copy link
Sponsor

Context

No response

Bug description

When clicking on either the View Source or Edit Source buttons, they both appear to bring you to the Edit page on GitHub. This can be seen in the Material for MkDocs official documentation. I noticed it specifically on the Reference page, but it can be seen on any page.

Related links

The following is the page I noticed it on, but it can be seen on any page.

Reproduction

repo_url: ...
theme:
  features:
    - content.action.edit
    - content.action.view

Steps to reproduce

  • Add content.action.edit and content.action.view to mkdocs.yml
  • Run mkdocs serve
  • Open local environment and click on either the Edit or View Source buttons.

As mentioned above, this can also be seen in the official documents.

Browser

Firefox

Before submitting

@squidfunk
Copy link
Owner

Thanks for reporting.

Note that we have new bug reporting guidelines, which is also mentioned in the descriptions in the bug reporting template you filled out. You did not provide a reproduction, but since this issue is apparent from the docs, we can look into it. Please read our new bug reporting guidelines to learn how to create a reproduction.

@squidfunk squidfunk added bug Issue reports a bug incomplete labels Jan 3, 2023
@squidfunk
Copy link
Owner

Fixed in feef8cd.

So there were two things at play here. First of all, the edit part of the URL was not correctly replaced with view, which is a bug on our side. But GitHub seems to have invalidated the view controller, which must now be called raw.

@squidfunk squidfunk added resolved Issue is resolved, yet unreleased if open and removed incomplete labels Jan 3, 2023
@squidfunk
Copy link
Owner

Released as part of 9.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants