Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4681

Faces 4.1 TCK Failure: headRenderPassthroughTest - Head ID Not Rendered

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.1.0-RC2
    • 5.0.0, 4.1.0-RC3
    • None
    • None

    Description

      Test: https://github.com/jakartaee/faces/blob/4.1.0-RELEASE/tck/old-tck/source/src/com/sun/ts/tests/jsf/spec/render/head/URLClient.java#L85

      We fail to render the head id for this test even though it's specified in the facelet.

      App:
      https://github.com/jakartaee/faces/tree/fbaccab3da18ee26d40cd6f77d91de79ef1c7b15/tck/old-tck/source/src/web/jsf/spec/render/head

      Related Spec Issue: https://github.com/jakartaee/faces/issues/1760

       

      As noted by BalcusC's comment, the output mode is controllable, not by the doctype, but by the <facelets-processing> in faces-config.xml.

      By default, the facelet processing is the HTML5 output.  This means the publicId and systemId should be null as there is no DTD.  This is not the case in our code, as we create with doctype using the declaration from the xhtml page. (The facelet in the test uses HTML4, hence publicid and systemid are declared)

      Doctype initialization:
      https://github.com/apache/myfaces/blob/4.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CompilationManager.java#L148

      This leads to the HTML5 check to fail when attempting to render the IDs in the head and body elements.

      https://github.com/apache/myfaces/blob/4.1.x/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlHeadRenderer.java#L64-L67

      https://github.com/apache/myfaces/blob/4.1.x/impl/src/main/java/org/apache/myfaces/renderkit/html/util/HtmlRendererUtils.java#L1785-L1787

      Please review in case anything looks incorrect. 

      Attachments

        1. jsf_render_head_web.war
          6 kB
          Volodymyr Siedlecki

        Activity

          People

            volosied Volodymyr Siedlecki
            volosied Volodymyr Siedlecki
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: