0

I just deployed to openshift an realized the app page is not rendering properly. The glyphicons are missing. I got this error in console Failed to decode downloaded font: ...../fonts/glyphicons-halflings-regular.woff2. Don't know what causes it, can it be something with MIME mappings? I tried to add proper mappings, but without success. Found some thread, but is not probably related.

Any idea how to investigate?

Zveratko
  • 2,663
  • 6
  • 35
  • 64

3 Answers3

1

So the problem was trivial the maven-resource-plugin somehow broke the font files so just adding following to pom.xml to stop filtering those files

  <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>**/*.ttf</exclude>
                    <exclude>**/*.eot</exclude>
                    <exclude>**/*.woff</exclude>
                    <exclude>**/*.woff2</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*.ttf</include>
                    <include>**/*.eot</include>
                    <include>**/*.woff</include>
                    <include>**/*.woff2</include>
                </includes>
            </resource>
        </resources>
Zveratko
  • 2,663
  • 6
  • 35
  • 64
0

The problem lied in the fact that the glyphicon font files downloaded from bootstrap's customizer tool were not the same with the ones that are downloaded from the redirection found at bootstrap's homepage. The ones that are working as they should are the ones that can be downloaded from the following link:

http://getbootstrap.com/getting-started/#download

Anyone having problems with old bad customizer files should overwrite the fonts from the link above.

Sharad
  • 435
  • 1
  • 5
  • 18
  • The files seamed to be the same, anyway I have updated to new bootstrap without success. Maybe it is something Openshift specific? – Zveratko Jun 17 '15 at 08:25
  • Still opened, no change. Working locally, but not when deployed over openshift. Tried in firefox firebug, but it just shows wrong glyphicons and doesn't give any warning or error(Only chrome shows the error written above) – Zveratko Jun 17 '15 at 08:34
0

woff2 is new and not in /etc/mime.types on my debian jessie server. So I wrote the line

AddType application/font-woff2  .woff2

to Apaches mods-enabled/mime.conf - and now it works perfectly. You can found more info in another mailing: Proper MIME Type for woff2

Community
  • 1
  • 1
mareb
  • 31
  • 3