Editor decision sent multiple times to primary contact

Describe the issue or problem
The primary contact of a submission (the submitting author is a different person) complained that he received 5 times the same e-mail about the editor decision.
The first mail just had his e-mail address in the TO:
The second mail had his e-mail address and the author after him in the contributors list in the TO:
The third mail had his e-mail address and the following two contributors in the TO:
and so on …

@asmecher, @rcgillis - is this a known bug? Somewhere a loop must be programmed wrongly.

Excerpt of the e-mails sent out included below.

What application are you using?
For example, OJS 3.4.0-8

Additional information
The principal contact forwarded all e-mails to me. I concealed all sensitive information with [role] or [title].
Here is the 5th email:

Subject: [EXTERN] Editor Decision

[guest editor] via <ojs@chimia.ch>
Thu 23 Jan, 14:23 (19 hours ago)
to [principal contact],[contributor3],[contributor4],[contributor5],[contributor6]

The following email was sent to [contributor1] from CHIMIA regarding [title].

You are receiving a copy of this notification because you are identified as an author of the submission. Any instructions in the message below are intended for the submitting author, [contributor1], and no action is required of you at this time.

[contributor1][principal contact],[contributor3],[contributor4],[contributor5],[contributor6]:

We have reached a decision regarding your submission to {$contextName}, "[title]".

Our decision is to: Send to Review

Submission URL:  https://www.chimia.ch/chimia/authorDashboard/submission/7887

Here is the 4th email:

Subject: [EXTERN] Editor Decision

[guest editor] via <ojs@chimia.ch>
Thu 23 Jan, 14:23 (19 hours ago)
to [principal contact],[contributor3],[contributor4],[contributor5]

The following email was sent to [contributor1] from CHIMIA regarding [title].

You are receiving a copy of this notification because you are identified as an author of the submission. Any instructions in the message below are intended for the submitting author, [contributor1], and no action is required of you at this time.

[contributor1][principal contact],[contributor3],[contributor4],[contributor5],[contributor6]:

We have reached a decision regarding your submission to {$contextName}, "[title]".

Our decision is to: Send to Review

Submission URL:  https://www.chimia.ch/chimia/authorDashboard/submission/7887

I’ve had this problem as well, and the “fix” we found on GitHub didn’t work. I’ve only been able to find a work around by having decision emails sent only to the primary contact and not the entire list of contributors (you can change this in your journal settings).

Thank you @jhertzberg - can you point me to the GitHub repo with the fix, please?

Thanks, for @mpbraendle. I can’t find a particular Github issue that this would seem to relate to either. @asmecher - any ideas? Also, has this occurred across multiple submissions?

-Roger
PKP Team

https://github.com/pkp/pkp-lib/issues/10468

This is what we found, but it didn’t seem to solve the issue. @mpbraendle @rcgillis

1 Like

Hello all. @asmecher has pushed the changes to the repo for issue #10468 and should be available now. I have tested it out and it was able to reduce the duplicated emails. I provided some additional information and appeneded a before and after results of emails in the [OJS 3.4] co authors receive several e-mails when a decision is notified · Issue #10468 · pkp/pkp-lib · GitHub. Please let me know if this resolves your issues.
Note if you have changed the settings to only send emails to primary contact you will need to change it back to send to all contributors to see the changes after applying the fix.

Hi @jhertzberg and @nwoodward,

I see that you were also active on this thread and on the github issue, and may not have seen the issue go away with @forgive38’s pull request. I merged the pull request because it fixed an obvious problem, but I’m not sure yet where the remaining duplicates are coming from. Your help here would be much appreciated!

@nwoodward, you asked

I wonder if it’s because there are two sections of the sendAuthorEmails() function that seem to be doing the same thing. The function Mail::send() is called in both of them. Is only once necessary?

I think you’re referring to these calls to Mail::send():

I don’t think (reading the code) that those are the cause. The first starts with the $mailable object provided to the function, and the second is a fresh $mailable object (just reusing the same variable name).

The recipients from the first sending are tracked, then excluded from being addressed a second time.

If either of you is able to describe the reproduce steps in detail, or if you’re handy with PHP, add a few error_log lines to debug where the duplicates are coming from, it would be much appreciated!

(Links into github are for the code as of 3.4.0-8; @forgive38’s fix is not yet included there.)

Thanks,
Alec Smecher
Public Knowledge Project Team