I have purchased the commercial version of your Oxygen template and have noticed some errors on loading on my website.
The errors are...
Failed to load resource: the server responded with a status of 400 (Bad Request)
http://fonts.googleapis.com/css?family=Palatino%20Linotype,%20Book%20Antiqua,%20Palatino,%20serif
Failed to load resource: the server responded with a status of 400 (Bad Request)
http://fonts.googleapis.com/css?family=Arial,%20Helvetica,%20sans-serif
These errors are also on your Oxygen demo version so I believe the errors lie within the template itself.
I have set the fonts in the template GUI and I am using Arial font for body, article head, module head and hornav menus and Palatino Linotype for logo text. As these are all web safe fonts I don't think the template should be calling google fonts APIs. The fonts are all coming through correctly even with the errors showing.
I would appreciate it if you could tell me how to remove these errors please.
Thanks
- Sue
-
- Commercial Templates
- Tuesday, 05 February 2013
- Subscribe via email
Hi Sue
To prevent your template from attempting to load your fonts from Google remove the following lines from your templates styles.php (../templates/j51_oxygen/php/styles.php).
Ciarán
To prevent your template from attempting to load your fonts from Google remove the following lines from your templates styles.php (../templates/j51_oxygen/php/styles.php).
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $body_fontstyle ?>" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $articlehead_fontstyle ?>" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $modulehead_fontstyle ?>" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $hornav_fontstyle ?>" />
Ciarán
- more than a month ago
- Commercial Templates
- # 1
Thanks for your reply.
I have removed the code to test the solution and I am no longer getting the error messages but I still don't understand why the Google fonts were being called as I had selected Arial and Palotino Linotype, non-Google fonts.
I have tested the php code, by changing the assignment on both the if statement and the elseif for the articlehead, and it would seem that the code is running the elseif statement, i.e. when font != 'Arial'. I do not understand - but this would explain the google font calls!
Also, what will happen now, and in the future, if I select a Google Font from the Oxygen template GUI if the Google Font API calls have been removed?
Thanks.
I have removed the code to test the solution and I am no longer getting the error messages but I still don't understand why the Google fonts were being called as I had selected Arial and Palotino Linotype, non-Google fonts.
I have tested the php code, by changing the assignment on both the if statement and the elseif for the articlehead, and it would seem that the code is running the elseif statement, i.e. when font != 'Arial'. I do not understand - but this would explain the google font calls!
Also, what will happen now, and in the future, if I select a Google Font from the Oxygen template GUI if the Google Font API calls have been removed?
Thanks.
- more than a month ago
- Commercial Templates
- # 2
A better solution which would allow you to contineue to apply your Google fonts if needs be would be to replace the entire font code...
With...
Ciarán
<?php /*?>Set Google font choices to body, articleheads, moduleheads and hornav menu<?php */?>
<?php if(($body_fontstyle == "Arial") || ($body_fontstyle == "Courier") || ($body_fontstyle == "Tahoma") || ($body_fontstyle == "Garamond") || ($body_fontstyle == "Georgia") || ($body_fontstyle == "Impact") || ($body_fontstyle == "Lucida Console") || ($body_fontstyle == "Lucida Sans Unicode") || ($body_fontstyle == "MS Sans Serif") || ($body_fontstyle == "MS Serif") || ($body_fontstyle == "Palatino Linotype") || ($body_fontstyle == "Tahoma") || ($body_fontstyle == "Times New Roman") || ($body_fontstyle == "Trebuchet MS") || ($body_fontstyle == "Verdana") || ($body_fontstyle == "Webdings")) : ?>
<style type="text/css">body{font-family:<?php echo ($body_fontstyle); ?> }</style>
<?php elseif(($body_fontstyle != "Arial") || ($body_fontstyle != "Verdana") || ($body_fontstyle != "Tahoma") || ($body_fontstyle != "Century Gothic")) : ?>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $body_fontstyle ?>" />
<style type="text/css">body{font-family:<?php echo ($body_fontstyle); ?> }</style>
<?php endif; ?>
<?php if(($articlehead_fontstyle == "Arial") || ($articlehead_fontstyle == "Courier") || ($articlehead_fontstyle == "Tahoma") || ($articlehead_fontstyle == "Garamond") || ($articlehead_fontstyle == "Georgia") || ($articlehead_fontstyle == "Impact") || ($articlehead_fontstyle == "Lucida Console") || ($articlehead_fontstyle == "Lucida Sans Unicode") || ($articlehead_fontstyle == "MS Sans Serif") || ($articlehead_fontstyle == "MS Serif") || ($articlehead_fontstyle == "Palatino Linotype") || ($articlehead_fontstyle == "Tahoma") || ($articlehead_fontstyle == "Times New Roman") || ($articlehead_fontstyle == "Trebuchet MS") || ($articlehead_fontstyle == "Verdana")) : ?>
<style type="text/css">h2 {font-family:<?php echo ($articlehead_fontstyle); ?> !important }</style>
<?php elseif(($articlehead_fontstyle != "Arial") || ($articlehead_fontstyle != "Verdana") || ($articlehead_fontstyle != "Tahoma") || ($articlehead_fontstyle != "Century Gothic")) : ?>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $articlehead_fontstyle ?>" />
<style type="text/css">h2{font-family:<?php echo ($articlehead_fontstyle); ?> }</style>
<?php endif; ?>
<?php if(($modulehead_fontstyle == "Arial") || ($modulehead_fontstyle == "Courier") || ($modulehead_fontstyle == "Tahoma") || ($modulehead_fontstyle == "Garamond") || ($modulehead_fontstyle == "Georgia") || ($modulehead_fontstyle == "Impact") || ($modulehead_fontstyle == "Lucida Console") || ($modulehead_fontstyle == "Lucida Sans Unicode") || ($modulehead_fontstyle == "MS Sans Serif") || ($modulehead_fontstyle == "MS Serif") || ($modulehead_fontstyle == "Palatino Linotype") || ($modulehead_fontstyle == "Tahoma") || ($modulehead_fontstyle == "Times New Roman") || ($modulehead_fontstyle == "Trebuchet MS") || ($modulehead_fontstyle == "Verdana")) : ?>
<style type="text/css">.module h3, .module_menu h3{font-family:<?php echo ($modulehead_fontstyle); ?> }</style>
<?php elseif(($modulehead_fontstyle != "Arial") || ($modulehead_fontstyle != "Verdana") || ($modulehead_fontstyle != "Tahoma") || ($modulehead_fontstyle != "Century Gothic")) : ?>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $modulehead_fontstyle ?>" />
<style type="text/css">.module h3, .module_menu h3{font-family:<?php echo ($modulehead_fontstyle); ?> }</style>
<?php endif; ?>
<?php if(($hornav_fontstyle == "Arial") || ($hornav_fontstyle == "Courier") || ($hornav_fontstyle == "Tahoma") || ($hornav_fontstyle == "Garamond") || ($hornav_fontstyle == "Georgia") || ($hornav_fontstyle == "Impact") || ($hornav_fontstyle == "Lucida Console") || ($hornav_fontstyle == "Lucida Sans Unicode") || ($hornav_fontstyle == "MS Sans Serif") || ($hornav_fontstyle == "MS Serif") || ($hornav_fontstyle == "Palatino Linotype") || ($hornav_fontstyle == "Tahoma") || ($hornav_fontstyle == "Times New Roman") || ($hornav_fontstyle == "Trebuchet MS") || ($hornav_fontstyle == "Verdana")) : ?>
<style type="text/css">#hornav, #subMenusContainer a {font-family:<?php echo ($hornav_fontstyle); ?> !important}</style>
<?php elseif(($hornav_fontstyle != "Arial") || ($hornav_fontstyle != "Verdana") || ($hornav_fontstyle != "Tahoma") || ($hornav_fontstyle != "Century Gothic")) : ?>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $hornav_fontstyle ?>" />
<style type="text/css">#hornav, #subMenusContainer a {font-family:<?php echo ($hornav_fontstyle); ?> !important}</style>
<?php endif; ?>
<?php if(($logo_fontstyle == "Arial") || ($logo_fontstyle == "Courier") || ($logo_fontstyle == "Tahoma") || ($logo_fontstyle == "Garamond") || ($logo_fontstyle == "Georgia") || ($logo_fontstyle == "Impact") || ($logo_fontstyle == "Lucida Console") || ($logo_fontstyle == "Lucida Sans Unicode") || ($logo_fontstyle == "MS Sans Serif") || ($logo_fontstyle == "MS Serif") || ($logo_fontstyle == "Palatino Linotype") || ($logo_fontstyle == "Tahoma") || ($logo_fontstyle == "Times New Roman") || ($logo_fontstyle == "Trebuchet MS") || ($logo_fontstyle == "Verdana")) : ?>
<style type="text/css">h1.logo-text a{font-family:<?php echo ($logo_fontstyle); ?> }</style>
<?php elseif(($logo_fontstyle != "Arial") || ($logo_fontstyle != "Verdana") || ($logo_fontstyle != "Tahoma") || ($logo_fontstyle != "Century Gothic")) : ?>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $logo_fontstyle ?>" />
<style type="text/css">h1.logo-text a{font-family:<?php echo ($logo_fontstyle); ?> }</style>
<?php endif; ?>
<?php /*?>End Set Google font choices to body, articleheads, moduleheads and hornav menu<?php */?>
With...
<?php /*?>Set Google font choices to body, articleheads, moduleheads and hornav menu<?php */?>
<?php if(($body_fontstyle == "Arial, Helvetica, sans-serif") || ($body_fontstyle == "Courier, monospace") || ($body_fontstyle == "Tahoma, Geneva, sans-serif") || ($body_fontstyle == "Garamond, serif") || ($body_fontstyle == "Georgia, serif") || ($body_fontstyle == "Impact, Charcoal, sans-serif") || ($body_fontstyle == "Lucida Console, Monaco, monospace") || ($body_fontstyle == "Lucida Sans Unicode, Lucida Grande, sans-serif") || ($body_fontstyle == "MS Sans Serif, Geneva, sans-serif") || ($body_fontstyle == "MS Serif, New York, sans-serif") || ($body_fontstyle == "Palatino Linotype, Book Antiqua, Palatino, serif") || ($body_fontstyle == "Times New Roman, Times, serif") || ($body_fontstyle == "Trebuchet MS, Helvetica, sans-serif") || ($body_fontstyle == "Verdana, Geneva, sans-serif")) : ?>
<style type="text/css">body{font-family:<?php echo ($body_fontstyle); ?> }</style>
<?php elseif(($body_fontstyle != "Arial, Helvetica, sans-serif") || ($body_fontstyle != "Courier, monospace") || ($body_fontstyle != "Tahoma, Geneva, sans-serif") || ($body_fontstyle != "Garamond, serif") || ($body_fontstyle != "Georgia, serif") || ($body_fontstyle != "Impact, Charcoal, sans-serif") || ($body_fontstyle != "Lucida Console, Monaco, monospace") || ($body_fontstyle != "Lucida Sans Unicode, Lucida Grande, sans-serif") || ($body_fontstyle != "MS Sans Serif, Geneva, sans-serif") || ($body_fontstyle != "MS Serif, New York, sans-serif") || ($body_fontstyle != "Palatino Linotype, Book Antiqua, Palatino, serif") || ($body_fontstyle != "Times New Roman, Times, serif") || ($body_fontstyle != "Trebuchet MS, Helvetica, sans-serif") || ($body_fontstyle != "Verdana, Geneva, sans-serif")) : ?>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $body_fontstyle ?>" />
<style type="text/css">body{font-family:<?php echo ($body_fontstyle); ?> }</style>
<?php endif; ?>
<?php if(($articlehead_fontstyle == "Arial, Helvetica, sans-serif") || ($articlehead_fontstyle == "Courier, monospace") || ($articlehead_fontstyle == "Tahoma, Geneva, sans-serif") || ($articlehead_fontstyle == "Garamond, serif") || ($articlehead_fontstyle == "Georgia, serif") || ($articlehead_fontstyle == "Impact, Charcoal, sans-serif") || ($articlehead_fontstyle == "Lucida Console, Monaco, monospace") || ($articlehead_fontstyle == "Lucida Sans Unicode, Lucida Grande, sans-serif") || ($articlehead_fontstyle == "MS Sans Serif, Geneva, sans-serif") || ($articlehead_fontstyle == "MS Serif, New York, sans-serif") || ($articlehead_fontstyle == "Palatino Linotype, Book Antiqua, Palatino, serif") || ($articlehead_fontstyle == "Times New Roman, Times, serif") || ($articlehead_fontstyle == "Trebuchet MS, Helvetica, sans-serif") || ($articlehead_fontstyle == "Verdana, Geneva, sans-serif")) : ?>
<style type="text/css">h2{font-family:<?php echo ($articlehead_fontstyle); ?> }</style>
<?php elseif(($articlehead_fontstyle != "Arial, Helvetica, sans-serif") || ($articlehead_fontstyle != "Courier, monospace") || ($articlehead_fontstyle != "Tahoma, Geneva, sans-serif") || ($articlehead_fontstyle != "Garamond, serif") || ($articlehead_fontstyle != "Georgia, serif") || ($articlehead_fontstyle != "Impact, Charcoal, sans-serif") || ($articlehead_fontstyle != "Lucida Console, Monaco, monospace") || ($articlehead_fontstyle != "Lucida Sans Unicode, Lucida Grande, sans-serif") || ($articlehead_fontstyle != "MS Sans Serif, Geneva, sans-serif") || ($articlehead_fontstyle != "MS Serif, New York, sans-serif") || ($articlehead_fontstyle != "Palatino Linotype, Book Antiqua, Palatino, serif") || ($articlehead_fontstyle != "Times New Roman, Times, serif") || ($articlehead_fontstyle != "Trebuchet MS, Helvetica, sans-serif") || ($articlehead_fontstyle != "Verdana, Geneva, sans-serif")) : ?>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $articlehead_fontstyle ?>" />
<style type="text/css">h2{font-family:<?php echo ($articlehead_fontstyle); ?> }</style>
<?php endif; ?>
<?php if(($modulehead_fontstyle == "Arial, Helvetica, sans-serif") || ($modulehead_fontstyle == "Courier, monospace") || ($modulehead_fontstyle == "Tahoma, Geneva, sans-serif") || ($modulehead_fontstyle == "Garamond, serif") || ($modulehead_fontstyle == "Georgia, serif") || ($modulehead_fontstyle == "Impact, Charcoal, sans-serif") || ($modulehead_fontstyle == "Lucida Console, Monaco, monospace") || ($modulehead_fontstyle == "Lucida Sans Unicode, Lucida Grande, sans-serif") || ($modulehead_fontstyle == "MS Sans Serif, Geneva, sans-serif") || ($modulehead_fontstyle == "MS Serif, New York, sans-serif") || ($modulehead_fontstyle == "Palatino Linotype, Book Antiqua, Palatino, serif") || ($modulehead_fontstyle == "Times New Roman, Times, serif") || ($modulehead_fontstyle == "Trebuchet MS, Helvetica, sans-serif") || ($modulehead_fontstyle == "Verdana, Geneva, sans-serif")) : ?>
<style type="text/css">.module h3, .module_menu h3{font-family:<?php echo ($modulehead_fontstyle); ?> }</style>
<?php elseif(($modulehead_fontstyle != "Arial, Helvetica, sans-serif") || ($modulehead_fontstyle != "Courier, monospace") || ($modulehead_fontstyle != "Tahoma, Geneva, sans-serif") || ($modulehead_fontstyle != "Garamond, serif") || ($modulehead_fontstyle != "Georgia, serif") || ($modulehead_fontstyle != "Impact, Charcoal, sans-serif") || ($modulehead_fontstyle != "Lucida Console, Monaco, monospace") || ($modulehead_fontstyle != "Lucida Sans Unicode, Lucida Grande, sans-serif") || ($modulehead_fontstyle != "MS Sans Serif, Geneva, sans-serif") || ($modulehead_fontstyle != "MS Serif, New York, sans-serif") || ($modulehead_fontstyle != "Palatino Linotype, Book Antiqua, Palatino, serif") || ($modulehead_fontstyle != "Times New Roman, Times, serif") || ($modulehead_fontstyle != "Trebuchet MS, Helvetica, sans-serif") || ($modulehead_fontstyle != "Verdana, Geneva, sans-serif")) : ?>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $modulehead_fontstyle ?>" />
<style type="text/css">.module h3, .module_menu h3{font-family:<?php echo ($modulehead_fontstyle); ?> }</style>
<?php endif; ?>
<?php if(($hornav_fontstyle == "Arial, Helvetica, sans-serif") || ($hornav_fontstyle == "Courier, monospace") || ($hornav_fontstyle == "Tahoma, Geneva, sans-serif") || ($hornav_fontstyle == "Garamond, serif") || ($hornav_fontstyle == "Georgia, serif") || ($hornav_fontstyle == "Impact, Charcoal, sans-serif") || ($hornav_fontstyle == "Lucida Console, Monaco, monospace") || ($hornav_fontstyle == "Lucida Sans Unicode, Lucida Grande, sans-serif") || ($hornav_fontstyle == "MS Sans Serif, Geneva, sans-serif") || ($hornav_fontstyle == "MS Serif, New York, sans-serif") || ($hornav_fontstyle == "Palatino Linotype, Book Antiqua, Palatino, serif") || ($hornav_fontstyle == "Times New Roman, Times, serif") || ($hornav_fontstyle == "Trebuchet MS, Helvetica, sans-serif") || ($hornav_fontstyle == "Verdana, Geneva, sans-serif")) : ?>
<style type="text/css">#hornav{font-family:<?php echo ($hornav_fontstyle); ?> }</style>
<?php elseif(($hornav_fontstyle != "Arial, Helvetica, sans-serif") || ($hornav_fontstyle != "Courier, monospace") || ($hornav_fontstyle != "Tahoma, Geneva, sans-serif") || ($hornav_fontstyle != "Garamond, serif") || ($hornav_fontstyle != "Georgia, serif") || ($hornav_fontstyle != "Impact, Charcoal, sans-serif") || ($hornav_fontstyle != "Lucida Console, Monaco, monospace") || ($hornav_fontstyle != "Lucida Sans Unicode, Lucida Grande, sans-serif") || ($hornav_fontstyle != "MS Sans Serif, Geneva, sans-serif") || ($hornav_fontstyle != "MS Serif, New York, sans-serif") || ($hornav_fontstyle != "Palatino Linotype, Book Antiqua, Palatino, serif") || ($hornav_fontstyle != "Times New Roman, Times, serif") || ($hornav_fontstyle != "Trebuchet MS, Helvetica, sans-serif") || ($hornav_fontstyle != "Verdana, Geneva, sans-serif")) : ?>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $hornav_fontstyle ?>" />
<style type="text/css">#hornav{font-family:<?php echo ($hornav_fontstyle); ?> }</style>
<?php endif; ?>
<?php if(($logo_fontstyle == "Arial, Helvetica, sans-serif") || ($logo_fontstyle == "Courier, monospace") || ($logo_fontstyle == "Tahoma, Geneva, sans-serif") || ($logo_fontstyle == "Garamond, serif") || ($logo_fontstyle == "Georgia, serif") || ($logo_fontstyle == "Impact, Charcoal, sans-serif") || ($logo_fontstyle == "Lucida Console, Monaco, monospace") || ($logo_fontstyle == "Lucida Sans Unicode, Lucida Grande, sans-serif") || ($logo_fontstyle == "MS Sans Serif, Geneva, sans-serif") || ($logo_fontstyle == "MS Serif, New York, sans-serif") || ($logo_fontstyle == "Palatino Linotype, Book Antiqua, Palatino, serif") || ($logo_fontstyle == "Times New Roman, Times, serif") || ($logo_fontstyle == "Trebuchet MS, Helvetica, sans-serif") || ($logo_fontstyle == "Verdana, Geneva, sans-serif")) : ?>
<style type="text/css">h1.logo-text a{font-family:<?php echo ($logo_fontstyle); ?> }</style>
<?php elseif(($logo_fontstyle != "Arial, Helvetica, sans-serif") || ($logo_fontstyle != "Courier, monospace") || ($logo_fontstyle != "Tahoma, Geneva, sans-serif") || ($logo_fontstyle != "Garamond, serif") || ($logo_fontstyle != "Georgia, serif") || ($logo_fontstyle != "Impact, Charcoal, sans-serif") || ($logo_fontstyle != "Lucida Console, Monaco, monospace") || ($logo_fontstyle != "Lucida Sans Unicode, Lucida Grande, sans-serif") || ($logo_fontstyle != "MS Sans Serif, Geneva, sans-serif") || ($logo_fontstyle != "MS Serif, New York, sans-serif") || ($logo_fontstyle != "Palatino Linotype, Book Antiqua, Palatino, serif") || ($logo_fontstyle != "Times New Roman, Times, serif") || ($logo_fontstyle != "Trebuchet MS, Helvetica, sans-serif") || ($logo_fontstyle != "Verdana, Geneva, sans-serif")) : ?>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $logo_fontstyle ?>" />
<style type="text/css">h1.logo-text a{font-family:<?php echo ($logo_fontstyle); ?> }</style>
<?php endif; ?>
<?php /*?>End Set Google font choices to body, articleheads, moduleheads and hornav menu<?php */?>
Ciarán
- more than a month ago
- Commercial Templates
- # 3
Thanks for your reply and replacement code.
I have replaced the font code in styles.php as you said and I can now see it is going through the correct path for my font settings.
Thanks again.
I have replaced the font code in styles.php as you said and I can now see it is going through the correct path for my font settings.
Thanks again.
- more than a month ago
- Commercial Templates
- # 4
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »