Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Error after submitting website's contact form

Solved by Dakta View solution

Started by Dakta 8 years ago · 3 replies · 765 views
8 years ago

Hi,

I've changed the Frontmatter content on my contact form and I'm getting an error when the form is submitted.
I added this:

email: null
subject: '[Site Contact Form] {{ form.value.name|e }}'
body: '{% include ''forms/data.html.twig'' %}'

This is the error I get after submitting the form:

"Argument 1 passed to Grav\Plugin\EmailPlugin::buildMessage() must be of the type array, null given, called in /var/www/vhosts/the-abuzzers.com/httpdocs/user/plugins/email/email.php on line 79"

What am I doing wrong? (i'm new on Grav :-( )

Thanks for your help.

Greetz,
djdakta

8 years ago Solution

Hi,

I solved this issue by myself and I'm proud about it. 🙂
(Damn... What a frustration it was.)

The issue was caused by the identation of the Frontmatter content in my contact form.
I did not respect the indentation after the 'process' paragraph.

After fixing this issue I got an other server error after submitting the form with this message:

“stream_socket_enable_crypto(): Peer certificate CN=*.ikoula.com' did not match expected CN=mail.the-abuzzers.com’”

I solved this by changing the email plugin configuration not to use the TLS encryption and go over port 25 instead of port 587.

I'm so glad! 😃

8 years ago

Oh well done, I was going to suggest using a real email address instead of "null" :)

8 years ago

Hey hughbris,

I've changed that but it did not help though, I'm glad I finally found what the issue was and that the contact form is now working as a charm! :-)😎

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 53 9 hours ago
Support · by Anna, 3 days ago
2 59 12 hours ago
Support · by Justin Young, 13 hours ago
1 30 13 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 56 5 days ago