Skip to content

Conversation

@nathancope-dev
Copy link

Description

This PR fixes an error that occurs when sending notification emails in the Formie plugin. The error occurs because the code calls a non-existent method StringHelper::cleanString(), which causes notifications to fail with the error message:

Failed to send notification email: {"error":"Notification email template parse error for "". Template error: "Call to undefined method craft\helpers\StringHelper::cleanString()" /vendor/verbb/formie/src/services/Emails.php:251"}

Changes

  • Replace the call to the non-existent StringHelper::cleanString() method with StringHelper::toString(), which is a valid method that safely converts the parsed content to a string

Testing Instructions

  1. Create a form with an email notification
  2. Submit the form
  3. Verify that the notification email is sent successfully without errors

Additional Notes

This issue likely started occurring after updating Formie to Version 2.1.46 (for Craft CMS 4.15.2)

@engram-design
Copy link
Member

What Formie version are you on? This should already be fixed for the next release 9d0b616 where StringHelper::cleanString does exist in our own helper class.

@nathancope-dev
Copy link
Author

It's happening on a deployed site that's using version 2.1.46.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants