Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-32242

Portal loads tool.css and print.css twice for inlined tools

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.2
    • Fix Version/s: 12.0 [Tentative]
    • Component/s: Portal
    • Labels:
    • 11 status:
      Merge
    • Test Plan:
      Hide
      • Visit a tool that has been inlined (most tools are now)
      • View the page source and confirm that the files tool.css and print.css have not be included twice.

      You are looking for lines like these:

      <link href="/library/skin/morpheus-default/tool.css?version=4ffb8957" rel="stylesheet" media="screen, tty, tv, handheld, projection">
      <link href="/library/skin/morpheus-default/print.css?version=4ffb8957" rel="stylesheet" media="print">

      Show
      Visit a tool that has been inlined (most tools are now) View the page source and confirm that the files tool.css and print.css have not be included twice. You are looking for lines like these: <link href="/library/skin/morpheus-default/tool.css?version=4ffb8957" rel="stylesheet" media="screen, tty, tv, handheld, projection"> <link href="/library/skin/morpheus-default/print.css?version=4ffb8957" rel="stylesheet" media="print">

      Description

      For tool content that is inlined into portal, it adds a reference to tool.css and print.css, even though these will already be included on the page. This results in the styles being loaded and parsed twice by the browser, which slows down page render time and causes issues when trying to debug CSS live on a page.

      The issue occurs because of the two #parse directives at the top of includeStandardHead.vm. The first one adds the content of the tool's header (which portal also contributes to) when the tool is inlined. The second one just always adds tool.css and print.css.

      This patch will address the issue by having portal only add the tool.css/print.css references to the tool's header if it is not being inlined.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                plukasew Paul Lukasewych
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code