-
AuthorPosts
-
September 10, 2018 at 10:11 pm #1008088
Hi there!
Hoping to understand why the Fontello upload is failing. We are receiving the following error when attempting to upload a fontello zip file:
Couldn’t add the font.The script returned the following error:Wasn’t able to work with Zip ArchiveWe are running a MultiSite recently switch to Kinsta hosting and use Offload Amazon S3 plugin.
This function was working prior to switching to Kinsta hosting. Now, I have been in touch with their support and narrowed down the error but not sure it is directly related to a hosting/php setting. Since we have S3 set to offload assets on upload, the zip file gets a cloud storage URL right away. How would this affect the function of unzipping on the server?
Here is a copy of the error message
FastCGI sent in stderr: “PHP message: PHP Warning: ZipArchive::open(): Empty string as source in /public/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/font-manager.class.php on line 116” while reading response header from upstreamSeptember 11, 2018 at 7:36 am #1008216Hey kjwaggz,
Thanks for posting the error, please enable PHP ZipArchive Extension and that should fix the issue, you may need your webhost to assist in enabling this php extension.
Let us know if this helps.Best regards,
NikkoSeptember 11, 2018 at 6:38 pm #1008492This reply has been marked as private.September 11, 2018 at 8:44 pm #1008600Hi kjwaggz,
Could be, did you disable the plugin and try to upload the zip?
Best regards,
VictoriaSeptember 11, 2018 at 9:12 pm #1008611This reply has been marked as private.September 12, 2018 at 7:11 am #1008747Hi kjwaggz,
Thanks for giving us admin access.
Can you give us ftp access also? so we can try to enable debugging and check further.
Just post the ftp details in private content, so it’s visible only to the moderators.Best regards,
NikkoSeptember 13, 2018 at 10:58 pm #1009699Ok, thank you very much. This would be really helpful to us to have this ability to upload the zip fonts.
September 15, 2018 at 10:04 am #1010060Hi,
The unzip function must be able to access the font folder and a temp directory on your server. The url to the font files doesn’t help in this case but you need the file path to the font files. The file path looks like /www/home/wordpress/wp-content/uploads/temp/font.zip (this is just an example), the url to the font files would then be https://mywebsite.com/wp-content/uploads/temp/font.zip.
That said we use the get_attached_file() function to fetch the path (see line 51 in enfold\config-templatebuilder\avia-template-builder\php\font-manager.class.php):
realpath(get_attached_file($attachment['id']));
If this code does not return the right path our unzip function will fail.
I deactivated the s3 plugin, delete your fontello font (because the file path was probably wrong) and uploaded another fontello font and it worked perfectly fine (it’s still installed if you want to test it).
I’d recommend to simply deactivate the s3 plugin before you upload your custom fonts. Afterwards you can activate it again and test if the fonts still work.
Best regards,
Peter -
AuthorPosts
- You must be logged in to reply to this topic.