The issue you're encountering with the .woff, .ttf, .woff2, and .eot font files generating an error 500 and being served with a "json" mime type is likely due to the HTTP server (WebSphere) not recognizing these font file formats or their associated mime types.
To resolve this, you can add the correct mime types for these font files to the WebSphere HTTP server. Here's how you can do it:
-
Modify the mime.types configuration: In WebSphere, you can configure mime types for various file formats by modifying the mime.types
file or through the WebSphere admin console:
-
WebSphere Admin Console: If you don't want to modify the mime.types
file directly, you can add the mime types via the WebSphere Admin Console by navigating to:
- Servers > WebSphere servers > [Your server] > MIME Types.
- Add the necessary mime type entries for the font file extensions.
This should resolve the 500 error and ensure the proper mime types are set for the font files.
If modifying these settings doesn't work or isn't an option, you might consider submitting an RFE (Request for Enhancement) with IBM for more robust handling of web font files within extensions.
------------------------------
Joe Breath
------------------------------
Original Message:
Sent: Wed August 08, 2018 09:56 AM
From: Reinier Battenberg
Subject: Webfonts in views throw Http Error 500
I am trying to include webfonts in my common view extension, so I can use them in my css.
However, all files with an file extension of .woff, .ttf .woff2 and .eot that are uploaded in the extension will generate an error 500 when requested through the browser. What is quite peculiar is that the mime-type of the request is json.
The workaround I can come up with is to manually copy the font files to the webcontent folder and access them from there, but that is besides the point of being able to upload themes & extensions.
Is there a way to add the woff, ttf, woff2 and eot mime-types to the Cognos (Webshere?) http server, so the error goes away?
Or is this a bug/feature request that I have to create an RFE for?
#CognosAnalyticswithWatson