Something wrong when calling file_prepare_directory without FILE_CREATE_DIRECTORY. The zip file cannot extract.

Here is some information from log:

File temporary://fileEaTjmk could not be copied, because the destination directory public://fontyourface/fontsquirrel/Action-Man-fontfacekit/web fonts/actionmanextended_bolditalic_macroman/specimen_files is not configured correctly.

It happen on fontsquirrel only.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Shellingfox’s picture

Title: Wrong call file_prepare_directory on fontsquirrel, break system use fontsquirrel font » Zip font have directory, the module doesnot create folder and cannot extract font file
Status: Needs work » Needs review
FileSize
1.29 KB

I'm not sure it happen on any version. Maybe last time my PHP upgrade and zlip updated too (Zip version 1.11.0 and Libzip version 0.10.1)

But the problem is the zip font have folder inside, the module doesnot create folder and it willnot extract the zip file.

Here is my patch to fix it.

teknocat’s picture

I was running into the same thing and created a very similar patch. This really needs to be incorporated into the next version.

PhobosK’s picture

I can confirm this patch is working, so lets hope really the problem will be fixed soon.

PhobosK’s picture

I've added @Shellingfox' fix to my patch work for fixing the problems in Font Squirrel module caused by the new API.

See my comment and the full patch here: #2109241-9: Cant Preview Fonts (Font Squirrel) or load fonts - Font Squirrel API changes
So now you can use Font Squirrel properly

stefan.korn’s picture

Version: 7.x-2.8 » 7.x-2.x-dev
Component: Code (general) » Font Squirrel (provider)

Patch worked for me too. So I think this patch should now be RTBC?

mrP’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

+1 RTBC

@Shellingfox - Thanks for the patch!

mrP’s picture

FYI, this may have been just my set up since no one else mentioned it. I noticed that the font extracted properly but that the path created in the fontyourface.metadata of the database was invalid. This causes the font to not load when utilized:

a:3:{s:2:"id";s:3:"520";s:4:"path";s:8:"Windsong";s:13:"font_filename";s:12:"Windsong.ttf";}

Versus a properly installed (and working) local font:

a:2:{s:4:"path";s:75:"public://fontyourface/local_fonts/FIFA_Welcome-normal-normal/stylesheet.css";s:8:"font_uri";a:1:{s:8:"truetype";s:79:"public://fontyourface/local_fonts/FIFA_Welcome-normal-normal/fifawelcome1.3.ttf";}}

paultrotter50’s picture

Patch worked for me too

Neslee Canil Pinto’s picture

Status: Reviewed & tested by the community » Closed (outdated)