Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-1196

Delivery of font-awesome fails with common settings in apache reverse proxy

    XMLWordPrintable

    Details

      Description

      Update install docu to reflect best practice configuration with Apache and OpenOLAT 10. Original bug report below.

      font-awesome is referenced using the path url(../../../font-awesome/...) in both css files, which in turn are referenced as /raw/build.identifier/themes/light/*.css
      This results in the following path for font-awesome: /raw/font-awesome/...

      Unfortunately this only works when OO is serving the static requests. If you use Apache to serve these using common rules like (see admin wiki)

      JkUnMount /raw/* worker1
      AliasMatch ^/raw/[0-9a-f:]*/(.*)  .../webapp/static/$1

      it obviously fails to deliver font-awesome.

      If this is intended behaviour then we should probably update the admin wiki.
      Otherwise, the following patch fixes this:

      diff --git a/src/main/webapp/static/themes/light/content.scss b/src/main/webapp/static/themes/light/content.scss
      index be087da..b3ce7d9 100644
      --- a/src/main/webapp/static/themes/light/content.scss
      +++ b/src/main/webapp/static/themes/light/content.scss
      @@ -33,7 +33,7 @@
       	Icon font includes. everyhting necessary to load the font and have the variables. 
          	Use our own mixins to add the fonts to content styles 
       */
      -$fa-font-path		: "../../../font-awesome/fonts" !default;
      +$fa-font-path		: "../../font-awesome/fonts" !default;
       $fa-css-prefix		: "o_icon" !default;
       @import "../../../font-awesome/scss/variables";
       @import "../../../font-awesome/scss/path";
      diff --git a/src/main/webapp/static/themes/light/modules/_icons.scss b/src/main/webapp/static/themes/light/modules/_icons.scss
      index 7d5664f..5aeb496 100644
      --- a/src/main/webapp/static/themes/light/modules/_icons.scss
      +++ b/src/main/webapp/static/themes/light/modules/_icons.scss
      @@ -1,5 +1,5 @@
       /* Load font-awesome library as we use font styles for the default icons */
      -$fa-font-path:        "../../../font-awesome/fonts" !default;
      +$fa-font-path:        "../../font-awesome/fonts" !default;
       
       /* we use fonts as icon base. In case you want to use bitmap icons instead, 
        * create your own o_icon class and add icons that correspond with the 
      

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              klemens Klemens Schölhorn
              Tester:
              Klemens Schölhorn
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: