Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Install a fresh site with standard settings.
Enable private files.
Install google fonts.
Doesn't work, recent log messages show:
page not found 03/24/2011 - 22:06 system/files/google_fonts/google_fonts.css
for both anonymous and authenticated users.
Comments
Comment #1
azman CreditAttribution: azman commentedThe public file location was set to:
sites/[domain]/files/public
The private file location was set to:
sites/[domain]/files/private
I can confirm that the google_fonts.css file has been created in:
sites/[domain]/files/private/google_fonts/google_fonts.css
The URI used to access the css file is:
/system/files/google_fonts/google_fonts.css?lik6ts
Copying the file to either directory has no effect.
Comment #2
azman CreditAttribution: azman commentedChanging the default download method to public does fix the problem.
Comment #3
BarisW CreditAttribution: BarisW commentedHmm, weird. Thanks for reporting and giving me all the info. I'd wish more people were this accurate with testing and reporting ;)
It seems that if I change the private directory from 'sites/[domain]/files/private' to something like '/Users/BarisW/Sites/some_dir/' (outside the Drupal installation) it works.
This is the code that I use to generate the file. If you see any strange things, please let me know:
Comment #4
BarisW CreditAttribution: BarisW commentedI was wrong. Even with absolute paths, I get a 404 when opening the generated path. I'll investigate further!
Comment #5
BarisW CreditAttribution: BarisW commentedI've set the path to public, as the Color module in Drupal7 core does this as well. Fixed in 7.x-2.0-alpha1
Comment #6
azman CreditAttribution: azman commentedNo problems, thanks for fixing the bug =)
Comment #7
Colorful Tones CreditAttribution: Colorful Tones commentedI was obtaining same bug in error log. I also had same exact file path setup as @azman. I tried upgrading to alpha version and got
Fatal error: Cannot unset string offsets in /public_html/sites/[domain]/modules/google_fonts/google_fonts.module on line 135
I also noticed that when I updated to alpha there was no option to enable 'Google Font UI' on the Modules tab, but only the option to enable 'Google Font' module. Not sure if this was intended?
Last, I can confirm that my changes were being saved in /public/google_font/google_fonts.css when running current stable: 7.x-1.6
Comment #8
BarisW CreditAttribution: BarisW commentedHi Colorful. So there seems to be a problem with the upgrade path.
The Google Fonts UI module now has been integrated. So instead of 2 modules, I now have one module.
I'll investigate!