Closed (fixed)
Project:
Mailer Plus (DSM+)
Version:
1.1.0-beta3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jun 2022 at 06:52 UTC
Updated:
28 Nov 2022 at 14:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
maulik1992 commentedI will check this
Comment #3
maulik1992 commented@jons can you please elaborate PHP version , I am not able to enable php 8.1 and D10 this module , errors throwing .
Comment #4
maulik1992 commentedComment #5
jons commented@maulik1992 I was using php 7.4, Drupal 9.3.15
Comment #6
adamps commentedThanks for the report. The problem comes after importing config. I updated the IS with a proposed fix. I someone creates a patch then I would commit it.
Comment #7
immaculatexavier commentedI've attached the patch in accordance with the proposed resolution.
Comment #8
jons commentedHi @AdamPS
I think it's better and more consistent to set the default as
<site>as you do with the policy: User - 'Admin (user awaiting approval)'and remove the use of 'dummy' altogether
Comment #9
wellsAgree with #8 -- it's unclear from the (in code) documentation why "dummy" is used here and
<site>seems like a saner default. Attaching an alternative patch for that.Comment #10
adamps commentedThanks @immaculatexavier
I agree this is a bit confusing and it would help to have better comments (I can add them when I commit). In fact the value "dummy" is not a default. It is a placeholder value that should never be used. Once we fix this bug with #7, it would correctly not be used.
There is a problem with #9:
Therefore please can @Jons and/or @wells test the patch in #7 and mark as RTBC?
Comment #11
wells@AdamPS — I see. In my case this value is used in the resulting configuration. Do you have a recommendation for how to provide a fix as part of the patch as well?
Comment #12
adamps commentedFirst apply the patch then re-import config for update manager (/admin/config/system/mailer/import).
Comment #13
wellsI have tested the patch in #7 and it works as expected on first import -- no policy is added if update notifications are disabled.
However if I already have a policy using the "dummy" address because I imported policies without this fix, applying the patch in #7 and re-importing has no effect -- the "Update Manager" policy with "dummy" address is still there.
Comment #14
adamps commentedGreat.
Thanks - that's a shame. I checked the code and I agree, there's no way it will delete the existing policy, and it would be dangerous if it did.
Sites that already hit this bug can just delete the wrong policy. Sorry I realise this is slightly tedious, but the module is still alpha, so there can be one or two things like this.
Comment #15
wells@AdamPS OK -- fair to take that approach given we are still in alpha here. Perhaps a line in the release notes about the issue and solution would be minimally useful? E.g. --
Comment #16
adamps commentedYes good idea about the release note - I will try to remember😃.
Comment #17
adamps commentedComment #18
adamps commentedComment #20
adamps commentedUnfortunately I've just spotted there is still a bug - the import code will now never run because
notification.emailsis always overridden to dummy.Here is a new patch - please can someone test again? NB You need to update to the latest dev release before applying the patch.
Comment #21
wells@AdamPS it seems this still isn't working right. I tested using a fresh Drupal 9 install with the default notifications configuration (configured to email to "admin@example.com") --
With
1.0.0-alpha10the resulting policy has a To address of "dummy".With
dev-1.x d4761e7the resulting policy has no To address.With
dev-1.x d4761e7+ #20 patch the resulting policy still has no To address.Resulting config for
1.0.0-alpha10:Resulting config for both the
d4761e7andd4761e7+ #20 patch:Comment #22
adamps commentedThanks for the testing report. I think I have spotted the problem - here is a new patch.
Comment #23
wellsThanks, @AdamPS. Patch in #22 looks good.
Comment #25
adamps commentedThanks
Comment #27
steveoriolIf some modules are not up to date and the cron must send an email to the admin to warn him,
I get the following error every 15 minutes until the modules are up to date.
Error sending email: Email "dummy" does not comply with addr-spec of RFC 2822.I have the problem with D9.4.8 and symfony_mailer v1.1.0-beta3
[...]
OK, I found my problem, in fact I do not know why, but there was written "dummy" instead of a real email address in the field "To" on the configuration page "admin/reports/updates/settings".
now it works much better ;-)