Say which page and path lack markup in MarkupNotFoundException

Open
#1,957 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@0-two is already working on this.

Since Nov 19, 2026.

  • #1966 by @0-two — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
java
Domain
backend

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Java
Stars
800
Forks
437
Avg merge
21h 36m
Merged PRs (30d)
167

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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

All issues in apache/wicket

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.