Jetspeed 2
  1. Jetspeed 2
  2. JS2-764

There are much DOCTYPE directives in every result page of portal

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.1.3, 2.2.0
    • Component/s: None
    • Labels:
      None

      Description

      In result code of every portal pages there are much strings:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      This is because layout.vm contains this word at the start of file. So, I think, this string has to be clear out from layout.vm to another place, to achieve only one DOCTYPE string per portal page

        Activity

        Hide
        Woonsan Ko added a comment -

        The problem can be found when a page contains multiple layouts. (That is, when there are inline layout fragments.)
        I agree with Vitaly that the string should be cleared out from layout.vm.
        I think that header.vm and desktop.vm should have this line at the top.

        I'm going to finish this kind of clearing work in a couple of days.

        Show
        Woonsan Ko added a comment - The problem can be found when a page contains multiple layouts. (That is, when there are inline layout fragments.) I agree with Vitaly that the string should be cleared out from layout.vm. I think that header.vm and desktop.vm should have this line at the top. I'm going to finish this kind of clearing work in a couple of days.
        Hide
        Woonsan Ko added a comment -

        Fixed.

        The problem can be found when a page contains multiple layouts. (That is, when there are inner
        layout fragments.)
        Only theme header templates such as header.vm may have DocType declaration, and DocType
        declaration should be removed in the layout templates.
        Removed the declarations from the layout templates and added to theme header templates.

        Show
        Woonsan Ko added a comment - Fixed. The problem can be found when a page contains multiple layouts. (That is, when there are inner layout fragments.) Only theme header templates such as header.vm may have DocType declaration, and DocType declaration should be removed in the layout templates. Removed the declarations from the layout templates and added to theme header templates.
        Hide
        Thorsten Berger added a comment -

        Unfortunately the DOCTYPE in the decorator's header.vm is not recognized by Internet Explorer, as it's not the first content in the html page: There's one comment (originating from the layout.vm) in front: <!-- Decorator tigris $

        {decoTop}

        - $

        {decoBottom}

        -->
        No problem with Firefox, the DOCTYPE is recognized there, despite the comment.

        There has been an issue (JS2-483) dealing with css problems by missing DOCTYPEs.
        So I'd like to propose putting back the DOCTYPE into layout.vm, but now checking for being the root fragment, e.g.:

        #if($myFragment == $myPage.getRootFragment())

          1. set the DOCTYPE and assure it's only inserted once
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            #set($isRoot=true)
            #end

        Another solution would be to remove the mentioned comment. What do you think?

        Regards, Thorsten

        Show
        Thorsten Berger added a comment - Unfortunately the DOCTYPE in the decorator's header.vm is not recognized by Internet Explorer, as it's not the first content in the html page: There's one comment (originating from the layout.vm) in front: <!-- Decorator tigris $ {decoTop} - $ {decoBottom} --> No problem with Firefox, the DOCTYPE is recognized there, despite the comment. There has been an issue ( JS2-483 ) dealing with css problems by missing DOCTYPEs. So I'd like to propose putting back the DOCTYPE into layout.vm, but now checking for being the root fragment, e.g.: #if($myFragment == $myPage.getRootFragment()) set the DOCTYPE and assure it's only inserted once <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> #set($isRoot=true) #end Another solution would be to remove the mentioned comment. What do you think? Regards, Thorsten
        Hide
        Woonsan Ko added a comment -

        Thanks for your pointing out the mistake, Thorsten.
        I'd like to reopen this issue and fix by your second solution, removing the comment.
        IMO, header templates are more responsible for all header things including doctype, while layout templates are responsible mainly for laying out fragments.
        So, I assist your second solution, and I'll fix this problem until this Friday if there's no objection.

        Show
        Woonsan Ko added a comment - Thanks for your pointing out the mistake, Thorsten. I'd like to reopen this issue and fix by your second solution, removing the comment. IMO, header templates are more responsible for all header things including doctype, while layout templates are responsible mainly for laying out fragments. So, I assist your second solution, and I'll fix this problem until this Friday if there's no objection.
        Hide
        Thorsten Berger added a comment -

        Thanks for the quick response, Woonsan. I'm fully d'accord with your explanation.
        Regards, Thorsten

        Show
        Thorsten Berger added a comment - Thanks for the quick response, Woonsan. I'm fully d'accord with your explanation. Regards, Thorsten
        Hide
        Woonsan Ko added a comment -

        Fixed. Thank you very much, Thorsten.

        Show
        Woonsan Ko added a comment - Fixed. Thank you very much, Thorsten.

          People

          • Assignee:
            Woonsan Ko
            Reporter:
            Vitaly Baranovsky
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development