-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contact form #1564
Contact form #1564
Conversation
# Conflicts: # lib/helperFunctions/validateSettings.js
Partly fixed, mail settings fetch refactored. Yet, the contact form data is not delivered via email.. |
Autoform is already used for the contact form. |
@frenchbread note that this is related to the API Feedback form, rather than the Home page contact form. The API Feedback form is not submitting correctly. https://github.com/apinf/platform/tree/develop/feedback/client/form |
@@ -13,9 +14,12 @@ Meteor.methods({ | |||
|
|||
this.unblock(); | |||
|
|||
// Get email settings | |||
const mailSettings = Settings.findOne().mail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is dangerous code. Settings.findOne()
may return undefined, or the .mail
attribute may be undefined.
When you use mailSettings.toEmail
on line 22, it may throw an error if either of the above cases were true.
@brylie Right, my bad. Closing this |
@frenchbread it is OK, and the changes are actually helpful. Please open an issue related to the 'contact form' and open a PR with this branch. |
I updated the PR description with a new task related to this fix. @frenchbread please verify whether issue #884 is also fixed by this PR. If so, add 'Closes #884' to the task description. After you have checked #884, add the 'ready for review' label to this PR. |
@brylie Verified. Please review |
@frenchbread I am merging this now. Note that we need to add |
Closes #1572
Closes #884