[jira] Created: (OFBIZ-2543) Multiple DOCTYPE in rendered HTML

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-2543) Multiple DOCTYPE in rendered HTML

Nicolas Malin (Jira)
Multiple DOCTYPE in rendered HTML
---------------------------------

                 Key: OFBIZ-2543
                 URL: https://issues.apache.org/jira/browse/OFBIZ-2543
             Project: OFBiz
          Issue Type: Bug
          Components: ALL COMPONENTS
    Affects Versions: SVN trunk
            Reporter: Ryan Foster
            Priority: Minor
         Attachments: Picture 1.JPG, Picture 2.JPG, Picture 3.JPG

The XHTML Transitional DOCTYPE is being duplicated for each screen definition when each view is rendered in HTML.

Looked into this a bit and it looks like the  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> DOCTYPE declaration is being called in multiple files:

1. In HtmlScreenRenderer.java at line 75
2. In htmlScreenMacroLibrary.ftl at line 21
3. In headerHead.ftl at line 19



--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-2543) Multiple DOCTYPE in rendered HTML

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-2543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan Foster updated OFBIZ-2543:
-------------------------------

    Attachment: Picture 3.JPG
                Picture 2.JPG
                Picture 1.JPG

Screenshots of rendered source code for ecommerce/control/main view

> Multiple DOCTYPE in rendered HTML
> ---------------------------------
>
>                 Key: OFBIZ-2543
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2543
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL COMPONENTS
>    Affects Versions: SVN trunk
>            Reporter: Ryan Foster
>            Priority: Minor
>         Attachments: Picture 1.JPG, Picture 2.JPG, Picture 3.JPG
>
>
> The XHTML Transitional DOCTYPE is being duplicated for each screen definition when each view is rendered in HTML.
> Looked into this a bit and it looks like the  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> DOCTYPE declaration is being called in multiple files:
> 1. In HtmlScreenRenderer.java at line 75
> 2. In htmlScreenMacroLibrary.ftl at line 21
> 3. In headerHead.ftl at line 19

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-2543) Multiple DOCTYPE in rendered HTML

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-2543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anil K Patel reassigned OFBIZ-2543:
-----------------------------------

    Assignee: Anil K Patel

> Multiple DOCTYPE in rendered HTML
> ---------------------------------
>
>                 Key: OFBIZ-2543
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2543
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL COMPONENTS
>    Affects Versions: SVN trunk
>            Reporter: Ryan Foster
>            Assignee: Anil K Patel
>            Priority: Minor
>         Attachments: Picture 1.JPG, Picture 2.JPG, Picture 3.JPG
>
>
> The XHTML Transitional DOCTYPE is being duplicated for each screen definition when each view is rendered in HTML.
> Looked into this a bit and it looks like the  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> DOCTYPE declaration is being called in multiple files:
> 1. In HtmlScreenRenderer.java at line 75
> 2. In htmlScreenMacroLibrary.ftl at line 21
> 3. In headerHead.ftl at line 19

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2543) Multiple DOCTYPE in rendered HTML

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-2543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714115#action_12714115 ]

Adrian Crum commented on OFBIZ-2543:
------------------------------------

Ryan,

The DOCTYPE declaration was added to HtmlScreenRenderer.java so that we can be sure it is the first element in the page. Prior to that, the widget comments would precede the DOCTYPE element - which caused pages to fail validation and it caused problems in some browsers.


> Multiple DOCTYPE in rendered HTML
> ---------------------------------
>
>                 Key: OFBIZ-2543
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2543
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL COMPONENTS
>    Affects Versions: SVN trunk
>            Reporter: Ryan Foster
>            Assignee: Anil K Patel
>            Priority: Minor
>         Attachments: Picture 1.JPG, Picture 2.JPG, Picture 3.JPG
>
>
> The XHTML Transitional DOCTYPE is being duplicated for each screen definition when each view is rendered in HTML.
> Looked into this a bit and it looks like the  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> DOCTYPE declaration is being called in multiple files:
> 1. In HtmlScreenRenderer.java at line 75
> 2. In htmlScreenMacroLibrary.ftl at line 21
> 3. In headerHead.ftl at line 19

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2543) Multiple DOCTYPE in rendered HTML

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-2543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714119#action_12714119 ]

Ryan Foster commented on OFBIZ-2543:
------------------------------------

That makes sense to me, but why do we have a function in HtmlScreenRenderer.java that reads:

public void renderScreenBegin(Appendable writer, Map<String, Object> context) throws IOException {
        writer.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
        appendWhitespace(writer);
}

and then in htmlScreenMacroLibrary.ftl we have:

<#macro renderScreenBegin>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
</#macro>

If the function is already writing it in, then why are we also calling it inside the function that should be writing it in already?  Shouldn't it be one or the other?

> Multiple DOCTYPE in rendered HTML
> ---------------------------------
>
>                 Key: OFBIZ-2543
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2543
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL COMPONENTS
>    Affects Versions: SVN trunk
>            Reporter: Ryan Foster
>            Assignee: Anil K Patel
>            Priority: Minor
>         Attachments: Picture 1.JPG, Picture 2.JPG, Picture 3.JPG
>
>
> The XHTML Transitional DOCTYPE is being duplicated for each screen definition when each view is rendered in HTML.
> Looked into this a bit and it looks like the  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> DOCTYPE declaration is being called in multiple files:
> 1. In HtmlScreenRenderer.java at line 75
> 2. In htmlScreenMacroLibrary.ftl at line 21
> 3. In headerHead.ftl at line 19

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2543) Multiple DOCTYPE in rendered HTML

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-2543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714123#action_12714123 ]

Adrian Crum commented on OFBIZ-2543:
------------------------------------

HtmlScreenRenderer.java doesn't use the macros, MacroScreenRenderer.java does.

Keep the renderScreenBegin macro as-is, remove the DOCTYPE declarations from the other ftl files, and the markup should come out right.



> Multiple DOCTYPE in rendered HTML
> ---------------------------------
>
>                 Key: OFBIZ-2543
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2543
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL COMPONENTS
>    Affects Versions: SVN trunk
>            Reporter: Ryan Foster
>            Assignee: Anil K Patel
>            Priority: Minor
>         Attachments: Picture 1.JPG, Picture 2.JPG, Picture 3.JPG
>
>
> The XHTML Transitional DOCTYPE is being duplicated for each screen definition when each view is rendered in HTML.
> Looked into this a bit and it looks like the  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> DOCTYPE declaration is being called in multiple files:
> 1. In HtmlScreenRenderer.java at line 75
> 2. In htmlScreenMacroLibrary.ftl at line 21
> 3. In headerHead.ftl at line 19

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2543) Multiple DOCTYPE in rendered HTML

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-2543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714140#action_12714140 ]

Adrian Crum commented on OFBIZ-2543:
------------------------------------

Okay, I found a problem in the HTML view handlers that was contributing to this problem - that was fixed in trunk rev 779751. FTL files still need to be checked for redundant DOCTYPE declarations, so I'll leave this issue open.


> Multiple DOCTYPE in rendered HTML
> ---------------------------------
>
>                 Key: OFBIZ-2543
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2543
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL COMPONENTS
>    Affects Versions: SVN trunk
>            Reporter: Ryan Foster
>            Assignee: Anil K Patel
>            Priority: Minor
>         Attachments: Picture 1.JPG, Picture 2.JPG, Picture 3.JPG
>
>
> The XHTML Transitional DOCTYPE is being duplicated for each screen definition when each view is rendered in HTML.
> Looked into this a bit and it looks like the  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> DOCTYPE declaration is being called in multiple files:
> 1. In HtmlScreenRenderer.java at line 75
> 2. In htmlScreenMacroLibrary.ftl at line 21
> 3. In headerHead.ftl at line 19

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.