Closed (fixed)
Project:
Drupal core
Version:
8.2.x-dev
Component:
contact.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2016 at 21:05 UTC
Updated:
28 May 2020 at 14:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
larowlanComment #3
tbonomelli commentedComment #4
tbonomelli commentedChecks if there is an E-Mail to send, if not it skips sending the mail.
Still need to work on it.
Comment #5
ginovski commented1. Try something like: 'Error sending autoreply, missing sender mail address in %contact_form'
2. Use [] instead of array()
Comment #6
tbonomelli commentedChanged the errormessage and used [] instead of array().
Comment #7
tbonomelli commentedStarted writing a test-case for this, still need to figure out how to assert the error log.
Comment #9
tbonomelli commentedAdded the test, still fails though because the error doesn't seem to get logged.
Comment #10
berdirthe first check covers the second as well, so just ! is enough.
also, coding standards.
this is about php fatal errors, not related to what we do.
You need to enable the watchdog module and then check on admin/reports/dblog for example.
And you also need to check that you do not see the current error message with assert no text.
Comment #12
tbonomelli commentedEnabled dblog and added an assertion of the current error text.
Comment #13
berdirthis is not an exception message. jut directly look for that text with $this->assertNoText('...')
and remove the property.
comments must not be > 80 characters per line.
same here.
Comment #14
tbonomelli commentedRemoved the property and adjusted the comment.
Comment #15
tduong commentedSince you are touching these lines, change the array syntax as well.
Let's use non deprecated functions, use instead something like:
Comment #16
tbonomelli commentedChanged the array syntax
Didn't apply
$form_display = \Drupal::entityTypeManager()->getStorage('entity_form_display')->load('contact_message.foo.default');because it returns NULL.Comment #17
tbonomelli commentedComment #19
berdirI think mail-address isn't how that's written. Use e-mail address instead. However, the UI uses Auto-reply, so lets use auto-reply in the error message too.
About the deprecated function, just opened #2818227: Undeprecate entity_get_(form_)display() or offer a real replacement. Keep it like it is for now.
Comment #20
tbonomelli commentedApplied changes to the error messages.
Comment #22
tbonomelli commentedRemoved an unrelated change from the patch.
Comment #23
berdirThis looks good to me. We no longer show an error to the user and instead log it, with pretty clear information on why we can't send the auto-reply.
I think that's the best we can do and should help users who have this problem in the future.
Comment #24
larowlan+1 RTBC, great work folks
Comment #26
catchCommitted/pushed to 8.3.x and cherry-picked to 8.2.x. Thanks!
Comment #28
catchComment #30
sunil.yadav commentedHi I have update drupal version from 8.3 to drupal-8.8.5.
For contact for as anonymous user i am getting followig error
Error sending auto-reply, missing sender e-mail address…
Please suggest me what i am doing wrong.
Auto reply email is not working