[OJS 3.1.1.0] Default email sent multiple times per action

I’ve been notified that the same e-mail is sent several times for the same action. It happens sometimes and I cannot find any pattern.

Email key: REVISED_VERSION_NOTIFY

Looking at the DB, if I’m right, I see that the same email has been sent multiple times for the same log_id

MariaDB [revistasdb]> SELECT event_log.assoc_id, event_log.log_id, event_log.date_logged, event_log.message, event_log_settings.setting_value FROM event_log JOIN event_log_settings ON event_log.log_id=event_log_settings.log_id WHERE event_log.assoc_id=1130;
+----------+--------+---------------------+-------------------------------+------------------------------------------------------------------------------------------------------+
| assoc_id | log_id | date_logged         | message                       | setting_value                                                                                        |
+----------+--------+---------------------+-------------------------------+------------------------------------------------------------------------------------------------------+
|     1130 |   4203 | 2018-08-04 07:17:18 | submission.event.fileUploaded | New extensions of someArticle.pdf                      |
|     1130 |   8570 | 2019-03-19 10:21:04 | submission.event.fileUploaded | 1130-report.pdf                                                                                      |
|     1130 |   8592 | 2019-03-20 03:05:38 | submission.event.fileUploaded | New extensions of someArticle.pdf                      |
|     1130 |   8594 | 2019-03-20 03:06:55 | submission.event.fileUploaded | Reply to the reviewer.pdf                                                                            |
|     1130 |   9357 | 2019-04-18 16:37:33 | submission.event.fileUploaded | 1130-report-v2.pdf                                                                                   |
|     1130 |   9418 | 2019-04-19 11:55:59 | submission.event.fileRevised  | Article Text, New extensions of someArticle (1).tex    |
|     1130 |   9420 | 2019-04-19 11:56:55 | submission.event.fileRevised  | Article Text, New extensions of someArticle (1).pdf    |
|     1130 |   9422 | 2019-04-19 12:02:09 | submission.event.fileRevised  | Article Text, New extensions of someArticle (1).tex    |
+----------+--------+---------------------+-------------------------------+------------------------------------------------------------------------------------------------------+
83 rows in set (0.05 sec)

MariaDB [revistasdb]> SELeCT date_sent, assoc_id, subject FROM email_log WHERE subject='[journal] Revised Version Uploaded' and assoc_id='1130';
+---------------------+----------+-----------------------------------+
| date_sent           | assoc_id | subject                           |
+---------------------+----------+-----------------------------------+
| 2019-03-20 02:52:20 |     1130 | [journal] Revised Version Uploaded |
| 2019-03-20 02:54:54 |     1130 | [journal] Revised Version Uploaded |
| 2019-03-20 02:55:43 |     1130 | [journal] Revised Version Uploaded |
| 2019-03-20 03:03:21 |     1130 | [journal] Revised Version Uploaded |
| 2019-03-20 03:06:32 |     1130 | [journal] Revised Version Uploaded |

log_id: ???
| 2019-04-19 11:53:39 |     1130 | [journal] Revised Version Uploaded |
| 2019-04-19 11:55:12 |     1130 | [journal] Revised Version Uploaded |
| 2019-04-19 11:55:46 |     1130 | [journal] Revised Version Uploaded |

log_id: 9418 | 2019-04-19 11:55:59
| 2019-04-19 11:56:41 |     1130 | [journal] Revised Version Uploaded |
| 2019-04-19 11:56:45 |     1130 | [journal] Revised Version Uploaded |

log_id:  9420 | 2019-04-19 11:56:55
| 2019-04-19 12:01:31 |     1130 | [journal] Revised Version Uploaded |
| 2019-04-19 12:01:40 |     1130 | [journal] Revised Version Uploaded |

log_id:  9422 | 2019-04-19 12:02:09 
+---------------------+----------+-----------------------------------+
12 rows in set (0.00 sec

MariaDB [revistasdb]> SELECT * FROM email_templates_default WHERE email_key='REVISED_VERSION_NOTIFY';
+----------+------------------------+-------------+----------+--------------+------------+
| email_id | email_key              | can_disable | can_edit | from_role_id | to_role_id |
+----------+------------------------+-------------+----------+--------------+------------+
|      109 | REVISED_VERSION_NOTIFY |           0 |        1 |         NULL |        512 |
+----------+------------------------+-------------+----------+--------------+------------+
1 row in set (0.00 sec)

MariaDB [revistasdb]> SELECT COUNT(*) FROM email_templates_default_data WHERE email_key='REVISED_VERSION_NOTIFY';
+----------+
| COUNT(*) |
+----------+
|       21 |
+----------+
1 row in set (0.00 sec)
1 Like

We seem to have the same issue in 3.1.1-4. However, in our case those are letters to reviewers, which are sent repeatedly.

@Ph_We Could you resolve this issue?

It happened just recently. The journal manager turned off review notifications altogether. This did not help, since the reviewers still kept receiving those emails. Then he asked me to clear the cache, which I did. He has not addressed me so far, so I hope we managed to settle this.
But anyway this is not a solution.

@asmecher Any idea about what could be happening here?

Hi all,

Is it possible that the user is trying to upload a file several times?

Regards,
Alec Smecher
Public Knowledge Project Team

After some days I resume this issue

That was my first thought, but taking a look at the DB I guess there are more than one email sent for the same log_id. The queries are above, at the first post of this thread.

Hi @gonzalognzl,

Looking at the timestamps, none of the emails are sent in close enough proximity to suggest that a single request resulted in several of them being sent – this does support my suspicion that the file is being uploaded several times, I think.

Regards,
Alec Smecher
Public Knowledge Project Team

All right, I see it.
Thanks Alec