Logout menu item is missing when the site only sets logoutUrl

Open Beginner friendly
#357 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start with shell/header/app.tsx and compare the Logout menu item with the login fallback in shell/header/anonymous-menu/LoginButton.tsx; LinkMenuItem.tsx shows what happens when the route role is missing. Add the logoutUrl fallback described in the issue, then verify that Logout still uses the role when present and appears when only logoutUrl is configured.

Written by the indexing model from the issue text.

Description

Description

The Logout item in the user menu resolves only through the org.openedx.frontend.role.logout route role. If nothing provides that role, LinkMenuItem renders nothing.

In other words: a site that sets logoutUrl in its site.config, but doesn't also declare an external route for the role, gets a user menu with no way to log out. The template site and tutor-mfe both declare the route, so stock sites are fine. It's a trap for everybody else.

The Login button already does the right thing: it prefers the role and falls back to loginUrl. Logout should fall back to logoutUrl the same way.

Dominant language
TypeScript
Stars
4
Forks
13
Avg merge
3d 5h
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openedx/frontend-base

All issues in openedx/frontend-base

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.