Skip to content
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

Using a form field called message won't render in the email template #2242

Closed
robdekort opened this issue Aug 17, 2020 · 3 comments
Closed

Comments

@robdekort
Copy link
Contributor

Bug Description

See this issue.
Using a form field called message prevents it from being rendered in the email.antlers.htmltemplate.

How to Reproduce

  • Add a form with a field called message (in my case a textarea)
  • Add a template for the form
  • Submit the form and make sure an email goes out

Extra Detail

The code I used can be found here.
When you add a modifier to the field: {{ message | nl2br }} you actually get an error (got object, expected string). That might be a pointer.
Renaming the field to message_body solved the issue for me.

Environment

Statamic 3.0.0-beta.44 Pro
Laravel 7.25.0
PHP 7.4.6
No addons installed

Install method (choose one):

  • Fresh install from statamic/statamic
@jesseleite
Copy link
Member

jesseleite commented Aug 19, 2020

This one seems to be caused by this chunk of code in Laravel (specifically line 266, where $data['message'] is being set to an Illuminate\Mail\Message instance) 🤔

@jasonvarga
Copy link
Member

That's a bit of a bummer. 🤔

Been there since literally the first commit of Laravel though.

image

We might just have to document it as being a reserved word.

@jasonvarga
Copy link
Member

Closing this in favor of statamic/ideas#279

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

No branches or pull requests

3 participants