Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5561

Derived page without own markup leads to MarkupNotFoundException when BasePage has <wicket:head> in its markup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • 6.14.0
    • 6.15.0
    • wicket
    • None

    Description

      Both Page1 and Page2 extend BasePage (which extends WebPage).

      BasePage.html:

      <html>
      <wicket:head>
      ...
      </wicket:head>
      <body>
      ...
      <wicket:child/>	
      ...
      </body>
      </html>
      

      Page1.html:

      <wicket:extend>
      ...
      </wicket:extend>
      

      Page2 hat no own markup (there is no Page2.html).

      Calling Page1 and then Page2 leads to the following MarkupNotFoundException:

      org.apache.wicket.markup.MarkupNotFoundException
      'Markup not found for Component: [HtmlHeaderContainer [Component id = _header_0]]'
      org.apache.wicket.Component.internalRender(Component.java:2349)
      org.apache.wicket.Component.render(Component.java:2309)
      org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
      org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1555)
      org.apache.wicket.Page.onRender(Page.java:887)
      org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:142)
      org.apache.wicket.Component.internalRender(Component.java:2381)
      org.apache.wicket.Component.render(Component.java:2309)
      org.apache.wicket.Page.renderPage(Page.java:1024)
      org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:121)
      org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:274)
      org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
      org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
      org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
      org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
      org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
      org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
      org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
      org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
      org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Thread.java:662)
      

      (Calling Page2 without having called Page1 does not lead to a MarkupNotFoundException.)

      Attachments

        1. wicket5561.zip
          24 kB
          Dirk Reichelt

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              dirk.reichelt Dirk Reichelt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: