Say which page and path lack markup in MarkupNotFoundException

Đang mở
#1,957 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@0-two đang làm issue này rồi.

Từ ngày 19/11/2026.

  • #1966 của @0-two — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
800
Fork
437
Merge trung bình
21 giờ 36 phút
Pull request đã merge (30 ngày)
167

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/wicket

Tất cả issue của apache/wicket

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.