Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Learning header Help link renders href="null" when SUPPORT_URL is unset

Aperta Adatta ai principianti
#685 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, react
Ambito
frontend

Direzione di ricerca

Inizia da src/learning-header/LearningHeaderHelpLink.jsx, dove l'href del link Help viene costruito da getConfig().SUPPORT_URL all'interno di un template literal. Verifica cosa restituisce getConfig() quando SUPPORT_URL non è impostato, poi trova dove il learning header renderizza questo componente. È completato quando il link Help non viene renderizzato affatto senza SUPPORT_URL e continua a essere visualizzato con un URL valido. Cerca un test esistente per questo componente da estendere e verifica se si applica il pattern del widget Help della shell frontend-base.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The learning header's Help link renders as <a class="text-gray-700" href="null"> when the MFE config has no SUPPORT_URL. That's the default: neither the platform nor Tutor sets it for the learning MFE. Clicking it navigates to a relative null path.

Cause: src/learning-header/LearningHeaderHelpLink.jsx builds the href with a template literal:

<a className="text-gray-700" href={`${getConfig().SUPPORT_URL}`}>{intl.formatMessage(messages.help)}</a>

so an unset SUPPORT_URL (null) becomes the string "null", and the link always renders.

Expected: don't render the Help link when SUPPORT_URL is empty, as the frontend-base shell's Help widget does. #276 (2022, closed unmerged) proposed that.

Environment: Tutor main and verawood, learning MFE course home and unit pages, 2026-09-23; component unchanged on master since #545 (2024-10). This is the "Help link does not redirect" half of openedx/wg-build-test-release#579 (TC-00021). Found by the Open edX end-to-end test suite.

Lingua principale
JavaScript
Stelle
10
Fork
194
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openedx/frontend-component-header

Tutte le issue di openedx/frontend-component-header

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.