Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.
This repository was archived by the owner on May 13, 2024. It is now read-only.

Issue with the newest router #95

Closed as not planned
Closed as not planned
@Mister-Hope

Description

@Mister-Hope
  • I confirm that this is an issue rather than a question.

Bug report

The newest vue-router triggers an warning when navigating to routes with special charaters.

And it's common for Chinese. Japanese or other users to use their language in tags and categories.

E.g.:

---
tags:
  - 笔记
  - 随笔
---

And this plugin is generating links like /tag/笔记/ now, so issues will be shown in dev mode.

image

This issue is not an actual issue in the past few months before I run yarn upgrade and updated my deps to newest (3.4.9).

So I believe a version between 3.4.6-3.4.8 is showing isssues but works well.

With the newest deps, links like /tag/使用指南/ can be visited through other pages, but will break when visiting directly.

Reproduce:
If you visite https://vuepress-theme-demo.mrhope.site/ and press the 使用指南 here, everything is prefect
image

But if you visit https://vuepress-theme-demo.mrhope.site/tag/使用指南/ directly, you will get a 404.

Besides if you disable javascript, you can find out that layout is rendered correctly by SSR, and client-side hydration leads to the 404 pages:

image

SSR render result. (Visit https://vuepress-theme-demo.mrhope.site/tag/使用指南/ when disabling JavaScript)

Other relevant information

  • npx vuepress info:
  System:
    OS: Windows 10 10.0.19042
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz 
  Binaries:
    Node: 14.15.4 - C:\Program Files\nodejs\node.EXE       
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 7.3.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.19041.423.0), Chromium (87.0.664.75) 
  npmPackages:
    @vuepress/core:  1.8.0
    @vuepress/theme-default:  1.8.0
    vuepress:  1.8.0
  npmGlobalPackages:
    vuepress: Not Found

Config:

         {
            frontmatters: [
              {
                id: "tag",
                keys: ["tag", "tags"],
                path: "/tag/",
                layout: "Blog",
                scopeLayout: "Blog",
              },
              {
                id: "category",
                keys: ["category", "categories"],
                path: "/category/",
                layout: "Blog",
                scopeLayout: "Blog",
              },
            ],
          }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions