solspace / craft-freeform

Freeform for Craft: The most reliable form builder that's ready for wherever your project takes you.
https://docs.solspace.com/craft/freeform/v5/
Other
48 stars 61 forks source link

uploadPdf() Error in logs after upgrading to Freeform 5 #1195

Closed jonathanpardon closed 7 months ago

jonathanpardon commented 7 months ago

After upgrading to Freeform 5 we get an error in the logs, every time a form submits. The form has a pdf upload field. The file is uploaded for the submission, just shouldn't log an error.

Screenshot 2024-04-10 at 10 54 58

Calling unknown method: Solspace\Freeform\Elements\Submission::uploadPdf() in "__string_template__bf503647e09743635767ef533ff3e051" at line 23 {"template":"contact_submission_notification","file":"/var/www/html/htdocs/vendor/craftcms/cms/src/helpers/Template.php"} []

Expected behavior No error log

Craft & Plugin Info (please complete the following information):

Additional context

kjmartens commented 7 months ago

Sorry for the trouble @jonathanpardon,

Can you share with us what your setup is? What kind of form is this, and does it do anything special? What kind of fields does it contain? Any integrations? 🙂

jonathanpardon commented 7 months ago

We have some integrations but I disabled all, and still we get these errors. Also reinstalled freeform, so no integrations are enabled, or configured, submitted the form, and still the error.

Form type: Regular Form template: Grid Store submitted data : yes

dropdown : reason of contact Phone: phone number Email: email Text: First name Text: Last name Company: company Dropdown: country Textarea: Message Hidden: utm parameters File Upload: Attachement (.pdf) Checkbox : I agree ...

Screenshot 2024-04-16 at 11 34 50

kjmartens commented 7 months ago

Hi @jonathanpardon,

Sorry for the delay...

When I try this on my end, it never fails or logs errors. Can you share with me what your email notification template looks like? Either screenshots of it from the CP or attach the file here (if File-based). 🙂

jonathanpardon commented 7 months ago

Hi @kjmartens

the twig template in attachment. contact_submission_notification.twig.zip

jonathanpardon commented 7 months ago

@kjmartens check the template and found what's wrong, this is an issue that already existed in our code. Thanks for pointing me the right way.