How to fix extra confirmation emails on forms
Keyword stuffing: Extra Confirmation Emails / Conditional Logic Emails / POWRmail / powrzillaEmails
If you open standalone, and go to the browser console, type in APP_MODEL.attributes.emails and APP_MODEL.attributes.conditionalLogicEmails and you will see what is set for for a particular app
An app should only be able to have 1 email with emailType of confirmation , if there are more than one, then there was a problem.
If you run across issues with Formbuilders that have problems creating/saving auto responders (powrmail) or conditional logic emails, check to see how many powrzilla_emails the user has in our system.
You can fix this by deleting the extra emails - it can be tricky to identify which need to go, but this is the script we last used on production console when we ran across this issue:
emails_to_delete = []
current_user.apps.each do |app|
app.powrzilla_emails.order(:created_at).each_with_index do |email, i|
if i > 0
emails_to_delete << email.id if email&.email_type == 'confirmation'
end
end
end ;0
emails_to_delete
PowrzillaEmail.delete(emails_to_delete)
At this point, reload the standalone page and check the emails again... you may need to publish before trying to create new emails.
NOTE: there is an issue with ADMIN users trying to create Conditional Logic Emails - please log in as the user or test with a NON-ADMIN powr account!
We are implementing a fix to the templates endpoint for powrzilla which should solve the problem of users impacted by this bug from being able to create new emails and there will be another task to identify and fix the source bug which may be related to powrmail creation/saving in wix.