Closed (fixed)
Project:
Google Fonts
Version:
6.x-1.4
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
10 Aug 2010 at 12:29 UTC
Updated:
17 Sep 2010 at 12:23 UTC
Jump to comment: Most recent file
line 55:
if (is_array($font)) {
$font value comes as a string, so this check is incorrect, should be like in 1.3:
if (!empty($font)) {
or simply
if ($font) {
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 878794.patch | 695 bytes | webkenny |
Comments
Comment #1
mudsurfer commentedWIth reference to my post http://drupal.org/node/877666
Tested this solution successfully, by modding line 55 in module file.
Thankyou TJ
Comment #2
AdrianB commentedThe fix worked for me as well, thanks!
Comment #3
BarisW commentedJust a small note. It was
if (!empty($font)) {in version 1.3.I changed this to
is_arraybecause as of 1.3, $font will return an array instead of a string.This check helped me to fix the bug with the memory problem. If it returns an array, the uses saved the 1.3 or 1.4 version successfully. If not, he still uses the old font declaration. Changing this to
if ($font) {works for those who use the 1.3 version. Those who saved their settings with 1.2 and then upgraded to 1.3 (withif ($font) {instead ofif (is_array($font)) {will probably get the memory error again.The problem is that I didn't test with only one enabled font. I guess enabling two fonts will also solve your problem?
Comment #4
AdrianB commentedEnabling two (or more) fonts would not solve my problem. Only when I change to
if (!empty($font)) {I get fonts display on other pages than Google Fonts setting page. This is on a site that previously ran 1.2 (but couldn't run 1.3 due to the memory issue).On my other test site, where I've never used 1.2, only 1.3, I still have the same problem after updating to 1.4. Only when I change to
if (!empty($font)) {I get fonts display on other pages than Google Fonts setting page, just like my first site.Comment #5
mudsurfer commentedEnabling two or more fonts did not work for me either.
I originally had a number of fonts installed for testing and that was where I noticed my problems.
So sorry, multiple fonts activated is not a solution that works for me.
Cheers.
Comment #6
webkenny commentedI will roll a patch for this since it doesn't work for me either (even enabling more than two). Assigning to myself, Boris. Also changed the topic to be more clear for Google Searches.
Comment #7
webkenny commentedThis one does it. I went with the
emptyapproach simply because it feels more flexible.Comment #8
BarisW commentedThanks! Committed to 6.x-1.dev.
Comment #9
BarisW commentedAdded to 6.x-1.5.
Thanks again ;)
Comment #11
gooddesignusa commentedThe font "Droid Serif" isn't working in ie8. I haven't checked ie6,ie7,chrome or opera. I'm running the latest recommended version.
Comment #12
gooddesignusa commentedComment #13
AdrianB commentedgooddesignusa: I think you need to open a separate issue about that. This issue is about "Google Fonts do not display on any page but administrative. Wrong check in google_fonts_init()" and it is fixed.
Comment #14
AdrianB commented