[Bug] Import taxonomy wizard: "Continue" button on the Upload step silently no-ops after reopening the wizard with a previously used file
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 85/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Inizia da src/generic/loading-button/index.tsx e verifica come la callback del clic tiene traccia dello stato disabilitato, quindi segui il suo utilizzo da src/taxonomy/import-tags/ImportTagsWizard.tsx e il comportamento della cache in src/taxonomy/data/apiHooks.ts. Riproduci il problema riaprendo la procedura guidata e selezionando lo stesso file; è completato quando Continue passa a Populate Taxonomy Information a ogni tentativo senza ricaricare la pagina.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment: Master Sandbox, https://apps.master.openedx.io/authoring/home
Steps to reproduce
- Studio → Taxonomies → "+ Import".
- Upload any valid CSV/JSON file, click Continue — works, advances to the "Populate Taxonomy Information" step.
- Close the modal without completing the import.
- Reopen "+ Import", upload the same file again.
- Click Continue.
- Repeat step 4-5 on a subsequent reopen with a previously used file.
Expected result
Each time a valid file is uploaded and Continue is clicked on the Upload step, the wizard advances to the "Populate Taxonomy Information" step, regardless of whether that file was already used in an earlier session of the wizard.
Actual result
The first time through, Continue works as expected. On every subsequent reopen of the wizard where a previously used file is uploaded again, clicking Continue does nothing: no step change occurs and no error is shown. The button remains visually enabled. Only a full page reload restores normal behavior.
Observations
- The button appears visually enabled (not disabled).
- No console errors or warnings tied to this click.
- Neither the successful nor the stuck click fires any network request — the Upload→Populate transition is purely client-side (
setCurrentStep('populate')), so the network layer isn't involved.
Likely root cause (established by reading the code, not by a separate live test on the old version)
-
src/generic/loading-button/index.tsx— the click handler:const loadingOnClick = useCallback(async (e) => { if (disabled) { return; } ... }, [componentMounted, onClick]);disabledis missing from theuseCallbackdependency array, so the closure can capture a staledisabledvalue if the component itself isn't recreated. -
src/taxonomy/import-tags/ImportTagsWizard.tsx— the Continue button is rendered through this ternary:{importPlanResult.isLoading ? <LoadingSpinner /> : ( <LoadingButton disabled={!file || importPlanResult.isLoading || !!importPlanResult.error} onClick={reimport ? generatePlan : populateData} /> )}While
isLoadingtransitions fromtruetofalse, React unmounts and remountsLoadingButton, and the closure refreshes correctly — that's why the first attempt always works. -
src/taxonomy/data/apiHooks.ts(useImportPlan) — the react-query cache key is built astaxonomyId + file.name + file.lastModified + file.size. If a later session uploads the same file, the key matches an already-cached entry,isLoadingnever transitions totrueagain, andLoadingButtonnever remounts. The click then keeps hitting thedisabled=truevalue frozen from the earlier render, even though the button looks enabled (its visual state is updated separately, by auseEffectthat does watch the currentdisabled/isLoadingvalues). -
src/index.jsx— theQueryClientis created once for the whole app, so the cache persists for the entire page session, which is why reloading the page fixes the behavior: it clears that cache.
- Lingua principale
- Python
- Stelle
- 10
- Fork
- 33
- Merge medio
- 2g 4h
- PR unite (30g)
- 10
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openedx/openedx-core
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
openedx/openedx-core#831 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Course search panel on the Competency Management page doesn't match the Paragon components and tokens in the designForse già presa @AShatsila l’ha presa 2 giorni fa. Aperta
openedx/openedx-core#836 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Competency Management page: columns need a fixed height, and competency rows don't show a clickable cursorForse già presa @AShatsila l’ha presa 2 giorni fa. Aperta
openedx/openedx-core#835 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Start date filter on the Competency Management page uses UTC days, while Studio shows course dates in the user's time zoneForse già presa @AShatsila l’ha presa 2 giorni fa. Aperta
openedx/openedx-core#834 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[FE] Manage & Apply Competencies: delete a Competency RuleForse già presa @ufedaseyeuconsultant l’ha presa 2 giorni fa. Aperta
openedx/openedx-core#833 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di openedx/openedx-core
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
qgis/QGIS-Plugins-Website#459 ·
-
bug severity:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
bot-found bug priority: P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
madenvel/KalinkaPlayer#179 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ls1intum/edutelligence#1098 ·
I maintainer di solito rispondono entro 1 giorno