1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Wrong CSS MIME type

Wrong CSS MIME type

4 posts, 0 answered
  1. Thomas
    Thomas avatar
    223 posts
    Registered:
    19 Jan 2011
    01 Jun 2011
    Link to this post
    Hi,

    The following problem happens with Sitefinity 4.1 SP1.
    Steps to reproduce:

    - I upload a CSS file from the backend, through Content / Document & Files
    - I retrieve the link to this file
    - I go and edit a page, go to "Scripts and Styles" on the right, drop a "CSS" element on the page
    - I edit the CSS element to paste the CSS URL I copied earlier
    - I publish the page

    Result: with IE (tried IE6 and IE8), the CSS is applied. With Firefox (and probably other browsers), it isn't applied. From the HTML sources, I can see the CSS file is called in head, through a link element, and the URL is right, but the style is still not applied with Firefox. Looking at the Firefox error console, I see: "Error: The stylesheet blabla/style.css was not loaded because its MIME type, "application/octet-stream", is not "text/css"."

    Is this problem known?

    Thanks.
  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    23 Aug 2017
    02 Jun 2011
    Link to this post
    Hi Thomas,

    How do you retrieve the url of the uploaded css file? Please note when a file is uploaded trough Sitefinity backend it is stored in the database. To use the css file you want place it in the Sitefinity directory or preferably in App_Themes and browse for it the URL to it is relative "~/App_Data/Sitefinity/WebsiteTemplates/YourTemplate/App_Themes/css/". Reference your css files by placing them in your Sitefinity webapp folders.

    I hope this information helps.

    Kind regards,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Thomas
    Thomas avatar
    223 posts
    Registered:
    19 Jan 2011
    06 Jun 2011
    Link to this post
    Hi Stanislav,

    I wanted to be able to upload the CSS file from the backend so I (and others) do not have to redeploy / update the site when we want to touch up the CSS. I have no doubt that it'd work if I included it in the site project. To retrieve the URL, I simply click "Embed link to this file" under "Documents & Files". The URL is definitely right, else it wouldn't work with IE, and wouldn't give this error with Firefox.
    I think Sitefinity could automatically serve the right content type (and possibly let the admin override it by defining another content type).

    Edit: I guess I should upload my files through Administration / Files instead.
  4. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    23 Aug 2017
    06 Jun 2011
    Link to this post
    Hello Thomas,

    Thank you for getting back to me.
    Request for uploading files on the file system is logged in PITS and planned for Q2.
    As a solution, you could use built-in Document Manager provided by RadEditor. To achieve this, you need to map a template of the RadEditor and modify as described in this forum thread and save your css to a specific folder and then reference and use them.


    Greetings,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered