Support » Plugin: GF Upload to Email Attachment » Critical Error on A One Form

  • Upon submitting this particular form, I get this:

    Fatal error: Uncaught Error: Class ‘ZipArchive’ not found in /home/xxx/public_html/wp-content/plugins/gf-upload-to-email-attachment/gf-upload-to-email-attachment.php:41 Stack trace: #0 /home/xxx/public_html/wp-includes/class-wp-hook.php(290): GFUEA_custom_notification_attachments(Array, Array, Array) #1 /home/xxx/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array) #2 /home/xxx/public_html/wp-content/plugins/gravityforms/gravityforms.php(5886): apply_filters(‘gform_notificat…’, Array, Array, Array, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) #3 /home/xxx/public_html/wp-content/plugins/gravityforms/common.php(1767): gf_apply_filters(‘gform_notificat…’, Array, Array, Array) #4 /home/xxx/public_html/wp-content/plugins/gravityforms/common.php(1946): GFCommon::send_notification(Array, Array, Array, Array) #5 /home/xxx/public_html/wp-content/plugins/gravityforms/includes/api.php(1836): GFCommon::send_notifications(Array, Array, Array, true, in /home/xxx/public_html/wp-content/plugins/gf-upload-to-email-attachment/gf-upload-to-email-attachment.php on line 41
    There has been a critical error on your website.

    Learn more about debugging in WordPress.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WP CMS Ninja

    (@billiardgreg)

    So what I am thinking is happening is, your system does not have the ZipArchive functionality installed. If you are an admin you can try adding it.

    If not, are you willing to try the code at the following URL:
    https://snippets.wpcms.ninja/gfupload-w-ziparchive-class-check/

    I added a check to see if the class ZipArchive exists before attempting to use or create the zip file.

    Please let me know if this resolves the issue.

    It’s weird because I have multiple forms on my site and only this one has this error. I copied your code to overwrite the plugin code and it seems to be resolved now 🙂 Not sure why. Thank you!

    Plugin Author WP CMS Ninja

    (@billiardgreg)

    In the one form that it is happening on, you have a Multiple File upload field? On the others do you have just a single file upload field? The ZipArchive feature only attempts to create a zip file in the Multiple File upload as it tries to make one single file to attach. I was not checking to see if that class existed before I used that zip functionality and probably should have. So I did a quick rewrite for the updated code to do so.

    Just so you can understand what was happening.

    • This reply was modified 3 months, 3 weeks ago by WP CMS Ninja.
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.