Support Tickets - CMS - fontawesome

CMS - fontawesome

CMS 16.04.2016 751 Support Status: Closed Solution: Yes bluesatkv


Hi Jerome and Maria.

I need help please. I have problem with loading fontawesome files.

If I clear cache of web browser and then I loading web pages, then font awesome is missing.

I tested external files with font awesome and still not work (I don´t use font awesome in basic cms css file)

I don't know what do i do it.

In console is:

žádost Cross-Origin zablokována: zásada stejného původu neumožňuje načtení vzdáleného zdroje na http://www.bluesat.cz/template/bluesat/js-plugin/font-awesome/fonts/fontawesome-webfont.ttf?v=4.5.0. (Důvod: chybí hlavička CORS 'Access-Control-Allow-Origin').

downloadable font: download failed (font-family: "FontAwesome" style:normal weight:normal stretch:normal src index:2): bad URI or cross-site access not allowed source: http://www.bluesat.cz/template/bluesat/js-plugin/font-awesome/fonts/fontawesome-webfont.woff?v=4.5.0


Replies (12)

  • avatar bluesatkv

    I found solution from http://stackoverflow.com/questions/15024333/downloadable-font-on-firefox-bad-uri-or-cross-site-access-not-allowed

    To the header of the font files, so for example if you are using Apache you can add this to the .htaccess:

    <FilesMatch "\.(ttf|otf|eot|woff|woff2)$">  <IfModule mod_headers.c>    Header set Access-Control-Allow-Origin "*"  </IfModule></FilesMatch>

    -----------

    Now works perfect loading fontawesome from basic cms css file or from other external files.

    Solving maybe you can add to the FAQ section

    16.04.2016 0
  • avatar Jerome

    Font awesome is integrated nicely without your hack in our two templates available for CMS. Your code in the htaccess file is not a perfect solution do the vulnerability of allowing files to inject from any source.

    You might want to either add font awesome from the cloud or do it our way, where everything is inside the file system.

    You will find font awesome in css/stylesheet.css and the fonts in the folder fonts.

    16.04.2016 0
  • avatar bluesatkv

    I know but I have problem with loading fontawesome from stylesheet.css

    Solution from .htaccess is good. Maybe is problem in my server. I don't know.

    16.04.2016 0
  • avatar Jerome

    Ok, but just to make sure. Font awesome works fine from stylesheet inside the admin panel?

    16.04.2016 0
  • avatar bluesatkv

    Interesting questions, It never occurred to me.

    All is Ok in admin panel. Only in webpages. I tested in 4 computer with last version of firefox and is still same problem. I thought that I have problem with my pc. This problem I have from CMS version 1.6.

    16.04.2016 0
  • avatar bluesatkv

    I managed to evoke the situation with a basic template 'mosaic'.

    link removed

    Everything is loaded from the basic files and the problem still exists.

    17.04.2016 0
  • avatar bluesatkv

    But all is OK in ACP

    17.04.2016 0
  • avatar bluesatkv

    I tested:

    1. Firefox 45.0.2 - fontawesome has problem

    2. Chrome 49.0.2623 - fontawesome has problem

    XMLHttpRequest cannot load http://www.bluesat.cz/include/ajax/like_results.php?aid=1&locid=999. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://bluesat.cz' is therefore not allowed access.

    Font from origin 'http://www.bluesat.cz' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://bluesat.cz' is therefore not allowed access.

    17.04.2016 0
  • avatar Jerome

    But that does not happen with our template, so the problem must be in your custom template.

    I have run test on all browsers with our templates and there is no problem with font awesome, so the issue must be somewhere within your template.

    17.04.2016 0
  • avatar Jerome

    It also works here: link removed

    So I don't know what happen on the other page, do you have a live link?

    17.04.2016 0
  • avatar bluesatkv

    Hmm, interesting. I created new template from mosaic today. I'll test. Many thanks for your support.

    17.04.2016 0
  • avatar Jerome

    No problem, hope you find the solution for your custom template.

    *** Ticket closed ***

    17.04.2016 0