Cannot delete a Google web font

Bug #1292301 reported by Son Nguyen on 2014-03-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Robert Lyon
1.10
High
Robert Lyon
15.04
High
Unassigned

Bug Description

version: master
platform: all

After installing some google web fonts, I can see them on Configure site/Fonts.
When deletting a installed google web font, I got 'Access denied' message

Son Nguyen (ngson2000) on 2014-04-09
Changed in mahara:
importance: Undecided → High
assignee: nobody → Son Nguyen (ngson2000)
Robert Lyon (robertl-9) wrote :

Well this seems odd - we can install a google font from a zip file but when we display the font anywhere it is fetched directly from google via:

http[s]://fonts.googleapis.com/css?family=[name of font] and never actually uses the uploaded font files at all

So why do we even need to save the google font file at all?

When a site font is used in a skin and we export the skin the xml contains the site font files - but with a google font it does not contain the file.

Anyway the main reason why it is not deleting is that the file is saving in the skins/fonts/ directory rather than in it's own subdirectory. Eg for font 'bob' it should be saving in the skins/fonts/bob/ subdir.

I'll add a patch to fix that for now - with an upgrade to move existing google font files to the right subdirs

Changed in mahara:
status: New → In Progress
assignee: Son Nguyen (ngson2000) → Robert Lyon (robertl-9)
milestone: none → 1.10.0
Aaron Wells (u-aaronw) wrote :

Hi Robert,

As I recall, the way the Google Fonts system is set up by Google, does not require you to download anything. It's all done via CSS Urls that point at Google's servers, or something along those lines. So why do we need to upload a ZIP file? If I remember correctly, it's so that we can have the font files sitting on the web server, so that the server can use them to generate the skin thumbnail images.

The thing is... even that isn't really necessary. We could just ask for the Google font URL stuff, and then fetch the font files using curl. But I didn't have time to fix that when we went live with skins version 1.0, so that's how it currently is. But we should really fix it at some point.

Changed in mahara:
milestone: 1.10.0 → 1.10.1

I created bug #1381290 for removing the need for installing a Google font altogether so we don't miss it when the actual bug here is fixed.

Eduardo (o-eduardo) wrote :

How to Test:

1. Log in as Admin
2. Go to Administration → Configure site → Fonts
3. Click on “Install Google font(s)”
**Follow the steps if you do not have a google font saved as .zip file
4. Click on “Browse..” → Select your .zip file
5. Click on “Install Google font(s)”
6. Open terminal
7. Go to where your data is saved → possibly (dataroot/skins/font directory)
8. Run “sudo -u root ls skins/fonts”
9. Check the font directory is there → Passed
10. Go back to Administration → Configure site → Fonts
11. Click on “Delete font” → Yes
12. Go back to Terminal and run “sudo -u root ls skins/fonts”
13. Now the font directory should have been deleted → Passed

Reviewed: https://reviews.mahara.org/3572
Committed: http://gitorious.org/mahara/mahara/commit/743a57d56af73f812afe516ce93a98af846aa6b6
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 743a57d56af73f812afe516ce93a98af846aa6b6
Author: Robert Lyon <email address hidden>
Date: Tue Aug 5 14:13:46 2014 +1200

Placing google web fonts into their own subdir (Bug 1292301)

Allowing for them to be deleted correctly

Change-Id: Ie2c9b38e5f77eb3b4dcc2d3fe93e68134f964d9f
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9) on 2014-10-15
Changed in mahara:
status: In Progress → Fix Committed

Reviewed: https://reviews.mahara.org/3816
Committed: http://gitorious.org/mahara/mahara/commit/6e680e724e5d4b6e79a76687fbe8ceb6cdb4ac86
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.10_STABLE

commit 6e680e724e5d4b6e79a76687fbe8ceb6cdb4ac86
Author: Robert Lyon <email address hidden>
Date: Tue Aug 5 14:13:46 2014 +1200

Placing google web fonts into their own subdir (Bug 1292301)

Allowing for them to be deleted correctly

Change-Id: Ie2c9b38e5f77eb3b4dcc2d3fe93e68134f964d9f
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9) on 2015-04-17
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers