Answers.Body: <p>My issue was that the assets files were in the same folder as the twig template files. Moving the files to the <code>web</code> folder solved the issue.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T09:09:03.443Z
Answers.Text: Your issue was that your @font-face statement was wrong, it was instructing the browser to load the files from a location where they did not exist.
Answers.UserDisplayName: Seth Warburton
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T15:24:44.927Z
Answers.Text: Nope, it was not a 404, its seems that Craft somehow wanted to render the file as a template.
Answers.UserDisplayName: nmsdvid
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-12T12:11:05.447Z
Answers.LastActivityDate: 2018-03-12T12:11:05.447Z
Answers.UserDisplayName: nmsdvid
Body: <p>I'm having trouble to load an ttf and a woff file in Craft 3. I'm getting an error 500. The files exists and when trying to access it via the browser it shows: Twig Syntax Error – Twig_Error_Syntax Unexpected character "" for both of the files. Any suggestions ?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-11T21:33:47.517Z
Comments.Text: Instead of letting us guess what the issue might be it would be more useful to show us your code and your file structure.
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-12T08:15:32.297Z
Comments.Text: Hey Robin, There is nothing fancy going on actually. Just have a css style which is loading ttf and woff files. The chrome debugger shows error 500 and when i'm opening the file in the browser twig shows an error Twig Syntax Error – Twig_Error_Syntax Unexpected character "". Can it be some htaccess or twig error settings error ?
Comments.UserDisplayName: nmsdvid
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-12T08:24:36.497Z
Comments.Text: Most likely you didn't include them properly thus we need the code
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-12T08:27:40.587Z
Comments.Text: This is how i'm loading the icon font: @font-face{
      font-family:icomoon;
      src:url(54da533830dd0c1910ac66aa608c303a.eot);
      src:url(54da533830dd0c1910ac66aa608c303a.eot) format("embedded-opentype"),url(f1d29a50c6ddc22d39bd7e3f0e5ce345.ttf) format("truetype"),url(ee2c51fe7b99ae8ee7a1e64c6dcf77d7.woff) format("woff"),url(00f344a009ddb271ecd750817ffdeee1.svg) format("svg");
  }
Comments.UserDisplayName: nmsdvid
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-12T08:34:01.913Z
Comments.Text: Do you have your files directly next to your index.php`? Because that's where your code searches them
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-12T11:09:59.270Z
Comments.Text: no, the assets are in the templates folder. I'm also loading css and js files and those are correct.
Comments.UserDisplayName: nmsdvid
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-12T11:27:50.630Z
Comments.Text: That's why we need to see your folder structure. CSS and JS files should not be in your templates folder. Because only your web folder is accessable via normal URL you should put those files into your web folder in order to access them via public urls
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-12T11:43:50.743Z
Comments.Text: Thx Robin, the hint that the assets can't be in the same folder as the templates fixed my issue. Thx for your help.
Comments.UserDisplayName: nmsdvid
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-12T12:29:52.083Z
Comments.Text: That's why you should always provide more information. We ask certain things for good reasons
Comments.UserDisplayName: Robin Schambach
Tags: <craft3>
Title: Error 500 on ttf and woff files
ThreadText: # Error 500 on ttf and woff files
  
  (Asked by: username_0 on 2018-03-11)
  
  I'm having trouble to load an ttf and a woff file in Craft 3. I'm getting an error 500. The files exists and when trying to access it via the browser it shows: Twig Syntax Error – Twig\_Error\_Syntax Unexpected character "" for both of the files. Any suggestions ?
  
  **Tags:** craft3
  
  > **Comments:**
  > **username_1**: Instead of letting us guess what the issue might be it would be more useful to show us your code and your file structure.  
  > **username_0**: Hey username_1, There is nothing fancy going on actually. Just have a css style which is loading ttf and woff files. The chrome debugger shows error 500 and when i'm opening the file in the browser twig shows an error Twig Syntax Error – Twig_Error_Syntax Unexpected character "". Can it be some htaccess or twig error settings error ?  
  > **username_1**: Most likely you didn't include them properly thus we need the code  
  > **username_0**: This is how i'm loading the icon font: @font-face{     font-family:icomoon;     src:url(54da533830dd0c1910ac66aa608c303a.eot);     src:url(54da533830dd0c1910ac66aa608c303a.eot) format("embedded-opentype"),url(f1d29a50c6ddc22d39bd7e3f0e5ce345.ttf) format("truetype"),url(ee2c51fe7b99ae8ee7a1e64c6dcf77d7.woff) format("woff"),url(00f344a009ddb271ecd750817ffdeee1.svg) format("svg"); }  
  > **username_1**: Do you have your files directly next to your index.php`? Because that's where your code searches them  
  > **username_0**: no, the assets are in the templates folder. I'm also loading css and js files and those are correct.  
  > **username_1**: That's why we need to see your folder structure. CSS and JS files should not be in your templates folder. Because only your web folder is accessable via normal URL you should put those files into your web folder in order to access them via public urls  
  > **username_0**: Thx username_1, the hint that the assets can't be in the same folder as the templates fixed my issue. Thx for your help.  
  > **username_1**: That's why you should always provide more information. We ask certain things for good reasons  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-03-12. Score: 1
  
  My issue was that the assets files were in the same folder as the twig template files. Moving the files to the `web` folder solved the issue.
  
  > **Comments:**
  > **username_2**: Your issue was that your @font-face statement was wrong, it was instructing the browser to load the files from a location where they did not exist.  
  > **username_0**: Nope, it was not a 404, its seems that Craft somehow wanted to render the file as a template.  
  
  ---
  
  