Say which page and path lack markup in MarkupNotFoundException

Aperta
#1,957 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@0-two ci sta già lavorando.

Dal 19/11/2026.

  • #1966 di @0-two — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

Read wicket-core/src/main/java/org/apache/wicket/Component.java at internalRender(), then check the other MarkupNotFoundException and MarkupException throw sites in Component and MarkupContainer. Add tests in wicket-core-tests that assert the page class and page-relative component path appear in the message, including the Ajax parent-markup hint where applicable. An open linked pull request #1966 indicates work is already underway.

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

Descrizione

good first issue

When a component that was invisible at first render (and so has no markup in the response) is later added to an Ajax update, rendering fails with:

org.apache.wicket.markup.MarkupNotFoundException: Markup not found for Component: [FencedFeedbackPanel [Component id = feedback]]

The message gives the component's class and id, but not the page or the component's path, so in a large application it is hard to tell which of many feedback components failed, and why.

Where

wicket-core/src/main/java/org/apache/wicket/Component.java, internalRender(), where the exception is thrown, and the other places in Component and MarkupContainer that throw MarkupNotFoundException or MarkupException("Markup not found…").

Done when

  • The message includes the page class and the component's page-relative path. Where it's cheap to tell, add a hint for the common cause (a component added to an Ajax update whose parent's markup doesn't contain it).
  • Tests that assert on the new message in wicket-core-tests.

Background

Originally reported as WICKET-6538 (Wicket 7.9). Another user agreed that the page name would help.


Part of #1945. This issue is meant for a first contribution to Wicket. To work on it, leave a comment so others know; a claim without a pull request lapses after two weeks. Questions are welcome, here on the issue or on [email protected]. Start your branch from master, and see Send a pull request to Wicket for building and testing.

Lingua principale
Java
Stelle
800
Fork
437
Merge medio
21h 36m
PR unite (30g)
167

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 apache/wicket

Tutte le issue di apache/wicket

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.