• Hi,

    I’m experiencing a PHP Fatal Error caused by your plugin that completely
    breaks Contact Form 7 submissions, returning a 500 Internal Server Error.

    Environment:

    • WordPress: 6.7.x
    • PHP: 8.x
    • Contact Form 7: Latest version
    • Generate PDF Using Contact Form 7: Latest version
    • Hosting: Shared hosting (GoDaddy)

    The Problem:

    When a visitor submits a CF7 form, the plugin crashes with the following
    fatal error, preventing the form from being submitted entirely:

    PHP Fatal error: Uncaught Mpdf\MpdfException: Unable to create output file
    /home/customer/www/example.com/public_html/wp-content/plugins/generate-pdf-using-contact-form-7/attachments/

    Root Cause:

    It appears the plugin is using the raw HTML content of the email body as part of the PDF filename instead of generating a proper sanitized
    filename. This creates an invalid file path containing HTML tags like
    <p>, <style>, etc., which the filesystem cannot handle.

    The error occurs at:

    • File: generate-pdf-using-contact-form-7/inc/lib/mpdf/vendor/mpdf/mpdf/src/Mpdf.php (line 9609)
    • Called from: generate-pdf-using-contact-form-7/inc/front/class.cf7-pdf-generation.front.action.php (line 387)

    Stack trace confirms the issue happens during the wpcf7_before_send_mail
    hook when the plugin tries to generate the PDF attachment.

    Expected Behavior:
    The plugin should generate a sanitized filename (e.g., form-submission-1770619321-0187.pdf)
    instead of using HTML content as the filename.

    Temporary Workaround:
    I had to deactivate the plugin entirely to restore form functionality.

    Steps to Reproduce:

    1. Install and activate the plugin
    2. Configure it with any CF7 form
    3. Submit the form from the frontend
    4. Form submission fails with 500 error

    Could you please look into this filename generation bug? It seems like a
    critical issue that would affect all users.

    Thank you for your time.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Cristopher

    (@cristopherzwt)

    Hello @simsekabdurrahman

    Thank you very much for providing this information regarding the bug.

    We plan to resolve this issue in the next version of the plugin.

    Thank you for your patience and support.

    Thank you,
    Zealousweb

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.