Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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 Archive

    We 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 upstream

    #1008216

    Hey 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,
    Nikko

    #1008492
    This reply has been marked as private.
    #1008600

    Hi kjwaggz,

    Could be, did you disable the plugin and try to upload the zip?

    Best regards,
    Victoria

    #1008611
    This reply has been marked as private.
    #1008747

    Hi 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,
    Nikko

    #1009699

    Ok, thank you very much. This would be really helpful to us to have this ability to upload the zip fonts.

    #1010060

    Hi,

    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

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.