Skip to content

After changing username URL still redirects to old route

Steps to reproduce:

If a new user tries to claim the username which is now available after the rename they get the following error.

Username change failed - Namespace route path toon has been taken 
before. Please use another one. Namespace route is invalid. Namespace 
path toon has been taken before. Please use another one

Things to check. Redirect still present in the RedirectRoutes table.

RedirectRoute.find_by_path("toon")
=> #<RedirectRoute id: 229748, source_id: 214011, source_type: "Namespace", path: "toon", created_at: "2018-01-03 05:41:15", updated_at: "2018-01-03 05:41:15", permanent: true>

Route.find_by_path("toon_idle")
=> #<Route id: 220670, source_id: 214011, source_type: "Namespace", path: "toon_idle", created_at: nil, updated_at: "2018-01-03 05:41:14", name: "toon_idle">

ZD tickets:

Design

After clicking Update username button, a modal shows up and tell users how the redirects would work.

Copy: You are going to change the username **hazel** to **hazelyang**. Profile and projects will be redirected to the hazel namespace but this redirect will expire until the hazel namespace is registered by another user or group. Please update your Git repository remotes as soon as possible.

modal

cc// @mayra-cabrera @mkozono @stanhu @to1ne

Edited by Hazel Yang