- Issue created by @RoSk0
- Merge request !8709Issue #3460081: Avoid "Error sending email (from mail@example.com to with reply-to not set)." when no emails specified for update notifications β (Open) created by RoSk0
- Issue was unassigned.
- Status changed to Needs review
5 months ago 9:55pm 8 July 2024 - Status changed to Needs work
5 months ago 1:46pm 9 July 2024 - πΊπΈUnited States smustgrave
Appears to have test failures but seems like a fix that will need test coverage.
- First commit to issue fork.
- π§π·Brazil murilohp
Hi! I was also having this issue and the MR fixes the problem, I was not able to write a properly test to trigger the exact error:
Error sending email (from mail@example.com to with reply-to not set).
This would require us to send an e-mail on a test suite, and this is not possible. So, instead of trying to replicate the same issue, the test tries to save the "Email addresses to notify when updates are available" field with an empty value and validates the exact thing that's being saved.Before the fix, saving the field empty would result on something like:
$this->config('update.settings')->get('notification.emails') = [ 0 => "" ];
With the fix, it would be like:
$this->config('update.settings')->get('notification.emails') = [];
- π§π·Brazil murilohp
murilohp β changed the visibility of the branch 3460081 to hidden.
- π§π·Brazil murilohp
murilohp β changed the visibility of the branch 3460081 to active.
- Status changed to Needs review
4 months ago 3:18am 11 July 2024 - π§π·Brazil murilohp
Since the all tests passed, I'm moving this back to NR.
FYI: I've created another branch with the test only, but I don't know how to trigger the build on gitlab for that branch only, and when I try to compare the branch, for some reason I can't open a new MR. It's been while since my last contribution and a lot has changed, if you guys have any docs or tutorials about how to properly use gitlab, it would be great for me. Thanks!
- Status changed to RTBC
4 months ago 2:14pm 11 July 2024 - πΊπΈUnited States smustgrave
Ran the test-only feature
1) Drupal\Tests\update\Functional\UpdateSettingsFormTest::testUpdateSettingsForm Failed asserting that two arrays are identical. --- Expected +++ Actual @@ @@ -Array &0 [] +Array &0 [ + 0 => '', +] /builds/issue/drupal-3460081/core/modules/update/tests/src/Functional/UpdateSettingsFormTest.php:102 FAILURES! Tests: 1, Assertions: 47, Failures: 1.
Which does show the coverage.
Using the array filter appears to fix the issue described.
LGTM
- Status changed to Needs work
4 months ago 3:22am 14 July 2024 - π³πΏNew Zealand quietone
The issue summary states that the problem is that there is an unwanted/unnecessary log message. There should be a test here that this fix does indeed prevent that message from displaying.
I was also wondering if this message should change to an information level message to remind sites that the email address is not set. Any thoughts on that?
I have restored the issue summary template so I can add remaining tasks.
- Status changed to Closed: duplicate
4 months ago 1:23am 16 July 2024 - πΊπΈUnited States dww
I believe this is duplicate with π Cron tries to send update notification email while no email is set Needs work . Let's concentrate our efforts over there.
Thanks!
-Derek