Skip to content

Logout Link contains app_root twice. #40576

Closed

Description

@arashdalir

Bug description

when setting app_root to superset, the logout link now contains the value of app_root twice, as visible in the attached image.

Image

Screenshots/recordings

No response

Superset version

6.1

Python version

3.11

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Activity

  1. dosubot commented on Jun 1, 2026

    @dosubot

    This is a confirmed bug caused by PR #37537, which wrapped the backend-provided user_logout_url with ensureAppRoot() in RightMenu.tsx. Since the backend's appbuilder.get_url_for_logout already includes the app root in the URL, the frontend wrapping adds it a second time — resulting in /superset/superset/logout/ [1].

    PR #38033 fixes this by removing the redundant ensureAppRoot() call [2]. It has been tested by multiple users and is awaiting merge.

    Workaround — in superset-frontend/src/features/home/RightMenu.tsx, change:

    - <Typography.Link href={ensureAppRoot(navbarRight.user_logout_url)}>
    + <Typography.Link href={navbarRight.user_logout_url}>

    This is part of a broader pattern where several URLs (logout, SQL Lab, logo) get double-prefixed because both the backend middleware and frontend utility functions independently prepend app_root [3].

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about superset with Dosu Add Dosu to your team

  2. self-assigned this
    on Jun 3, 2026
  3. rusackas commented on Aug 3, 2026

    @rusackas
    Member

    This is already fixed on master. PR #38033 removed the redundant ensureAppRoot() wrap around user_logout_url in RightMenu.tsx (that's what was double-prefixing the logout link), and PR #39925 added a regression test for exactly this case (Logout link href is single-prefixed under subdirectory deployment in RightMenu.test.tsx), which passes on current master. Closing since there's nothing left to fix here.

  4. Tamayi commented on Aug 6, 2026

    @Tamayi

    The master fix is confirmed, but this still ships broken on the release branches. #38033's RightMenu.tsx change isn't on origin/6.2, which is unreleased and still has href={ensureAppRoot(navbarRight.user_logout_url)} — so 6.2.0 will ship the same double-prefixed logout that 6.1.0 did.

    Verified by checking out each ref and evaluating the shipped ensureAppRoot body against the values menu_data emits (user_logout_url = appbuilder.get_url_for_logout, already SCRIPT_NAME-prefixed by Flask's url_for):

    origin/6.1     -> /app-superset/app-superset/logout/
    origin/6.2     -> /app-superset/app-superset/logout/
    origin/master  -> /app-superset/logout/
    

    #38033 has no milestone or cherry-pick label, so this doesn't look queued. Could the one-line RightMenu.tsx hunk be cherry-picked to 6.2 before release? The ensureAppRoot idempotence guard is also master-only, so the RightMenu.tsx line alone is the minimal safe backport. Happy to open the cherry-pick PR.

  5. TamayiM-WHO commented on Aug 6, 2026

    @TamayiM-WHO

    Opened #42848 with the one-line RightMenu.tsx backport to 6.2, plus the regression test from #39925. Happy to raise the equivalent against 6.1 if that branch will see another release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

#bug:cosmeticCosmetic/layout/design tweak needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions