Skip to content

fix: redirect every pre-2.0.0 route path, not just the linked three (#85491) - #264

Merged
volarname merged 1 commit into
developfrom
fix/85491-legacy-route-redirects-all
Aug 17, 2026
Merged

fix: redirect every pre-2.0.0 route path, not just the linked three (#85491)#264
volarname merged 1 commit into
developfrom
fix/85491-legacy-route-redirects-all

Conversation

@volarname

Copy link
Copy Markdown
Contributor

Reported from devel: https://admin-dam.smedevel.sk/asset renders the not-found page.

2.0.1 redirected only the three paths other apps build links from (/asset/:id, /asset/file/:id,
/user/:id/edit). Bookmarks are the larger consumer and they cannot be enumerated, so every other
pre-2.0.0 path — a plain /asset, an /author/12 — still fell through to [...pathMatch].vue.

The shim is now a table of the 20 renamed roots that forwards whatever follows. The rename went one
level deeper for podcast and video-show episodes (episodeepisodes), so path segments are
rewritten as well. Paths 2.0.0 left alone (/login, /logout, /settings, /close-page,
/unauthorized) are not touched.

Still temporary — the TODO in src/router/legacyRedirects.ts names the link sources that have to
change before it can be deleted.

Verification

  • yarn lint clean (vue-tsc, oxlint, eslint, stylelint).
  • Derived the pre-2.0.0 path of every route in the generated typed-router.d.ts and navigated a
    memory-history router: 59 legacy paths, 0 failures, each landing on the matching current route.
    Query and hash survive (/asset/abc?tab=meta#roi/assets/abc?tab=meta#roi), nested renames
    work (/podcast/7/episode/9/edit/podcasts/7/episodes/9/edit), and /login / /logout /
    /settings/keywords are not swallowed by the /log and /settings neighbours.

Released as 2.0.2 — see doc/changelog/2.0.2.md.

…#85491)

2.0.1 only redirected the three paths other apps build links from. Bookmarks
are the larger consumer and they are not trackable, so /asset, /author/12 and
every other pre-2.0.0 path still landed on the not-found page — reported from
devel on /asset.

The shim is now a table of the 20 renamed roots, forwarding whatever follows.
The rename went one level deeper for podcast and video-show episodes
(episode -> episodes), so path segments are rewritten too. Paths 2.0.0 left
alone (/login, /logout, /settings, /close-page, /unauthorized) are not touched.

Verified by deriving the pre-2.0.0 path of every route in the generated
typed-router.d.ts and navigating a memory-history router: 59 legacy paths, all
landing on the matching current route with params, query and hash preserved,
none falling through to the catch-all.
@volarname
volarname merged commit ead2e85 into develop Aug 17, 2026
2 checks passed
@volarname
volarname deleted the fix/85491-legacy-route-redirects-all branch August 17, 2026 11:35
@volarname volarname mentioned this pull request Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant