[OJS3] Empty Email When New Announcement Posted

Hi!

We are currently using OJS3 and have an ongoing problem that when we add a new announcement a completely blank email is sent out. The journal editors would like this to stop happening. I think we might be missing an email template (I cannot see any email templates under Workflow > Emails containing ‘announcement’) but don’t know what the default email template content or name is for this action.

Any help appreciated :slight_smile:

There seem to be several posts about issues with Announcements in OJS, but none seem to have exactly the same symptoms that we’re seeing with one of our journals. We’re using OJS 3.2.1.2.

  1. Announcement is created by a journal and sent to all users.
  2. Announcement appears on the Announcement page on the public site.
  3. Users all receive a blank email message.

The editors have tried sending both with and without an image in the text. No luck. In each case, the users receive a blank email message.

As recommended in another thread, I have checked to see if we have the [Notification_Maillist] template listed in the UI (Settings > Workflow > Email > Email Templates). It is there and I can edit it (though I didn’t). I haven’t yet alerted our sysadmin because I want to make sure that we haven’t missed anything that I can fix in the UI.

Any suggestions would be much appreciated!

Hi @asasasasas

Have you considered restoring the default set of templates? There is a link to do that in the workflow section.

Cheers,
Jason

Yes, but the journal has made changes to some of their templates, so we need to identify and save those, first. It happened on another journal yesterday, so I suspect that the problem is something more systemic, rather than journal-specific.

–Marianne

If you’re missing the ANNOUNCEMENT template, you can add it. If you have that template key, but the body is empty when you edit it, you can just add it back. You haven’t mentioned what version of OJS you’re using, but the template body can be fetched out of the PO file for the email templates:

Cheers,
Jason

Hi @jnugent, how are you? I am experimenting the same problem descripted on this post. I have copied the content of the annoucement section from the file that you shared:

msgid "emails.announcement.subject"
msgstr "{$title}"

msgid "emails.announcement.body"
msgstr ""
"<b>{$title}</b><br />\n"
"<br />\n"
"{$summary}<br />\n"
"<br />\n"
"Visite nuestro sitio para leer el  <a href=\"{$url}\">anuncio completo</a>."

msgid "emails.announcement.description"
msgstr "Este correo es enviado cuando un nuevo anuncio es creado."


on my email.po file (store at locale/es_ES that is the language I used) but it didnt work. Am I modifying the wrong file? Thank you

Hi @elementslive

It’s not enough to just edit the PO file, since OJS doesn’t fetch the template from the file when it sends mail. It loads it out of the database. The PO files are only used when resetting the list of templates or installing OJS. You’ll need to make sure there is a valid announcement template in the emails grid in Website Settings → Workflow.

Cheers,
Jason

I solved the blank email issues with this simple script.
Add other languages ​​if necessary

#!/bin/sh
######## exec in /patchOJS/lib/pkp/tools
echo “corrigindo emails, favor aguarde…”

php installEmailTemplate.php ANNOUNCEMENT es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php CITATION_EDITOR_AUTHOR_QUERY es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php COPYEDIT_REQUEST es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php EDITOR_ASSIGN es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php EDITOR_DECISION_ACCEPT es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php EDITOR_DECISION_DECLINE es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php EDITOR_DECISION_RESUBMIT es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php EDITOR_DECISION_REVISIONS es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php EDITOR_DECISION_SEND_TO_EXTERNAL es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php EDITOR_DECISION_SEND_TO_PRODUCTION es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php EDITOR_RECOMMENDATION es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php EMAIL_LINK es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php LAYOUT_COMPLETE es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php LAYOUT_REQUEST es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php LOCKSS_EXISTING_ARCHIVE es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php LOCKSS_NEW_ARCHIVE es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php MANUAL_PAYMENT_NOTIFICATION es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php NOTIFICATION es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php NOTIFICATION_CENTER_DEFAULT es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php OPEN_ACCESS_NOTIFY es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php ORCID_COLLECT_AUTHOR_ID es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php ORCID_REQUEST_AUTHOR_AUTHORIZATION es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php PASSWORD_RESET es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php PASSWORD_RESET_CONFIRM es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php PAYPAL_INVESTIGATE_PAYMENT es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php PUBLISH_NOTIFY es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEWER_REGISTER es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_ACK es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_CANCEL es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_CONFIRM es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_DECLINE es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REINSTATE es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REMIND es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REMIND_AUTO es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REMIND_AUTO_ONECLICK es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REMIND_ONECLICK es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REQUEST es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REQUEST_ATTACHED es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REQUEST_ATTACHED_SUBSEQUENT es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REQUEST_ONECLICK es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REQUEST_ONECLICK_SUBSEQUENT es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REQUEST_REMIND_AUTO es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REQUEST_REMIND_AUTO_ONECLICK es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVIEW_REQUEST_SUBSEQUENT es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php REVISED_VERSION_NOTIFY es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php STATISTICS_REPORT_NOTIFICATION es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php SUBMISSION_ACK es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php SUBMISSION_ACK_NOT_USER es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php SUBSCRIPTION_AFTER_EXPIRY es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php SUBSCRIPTION_AFTER_EXPIRY_LAST es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php SUBSCRIPTION_BEFORE_EXPIRY es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php SUBSCRIPTION_NOTIFY es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php SUBSCRIPTION_PURCHASE_INDL es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php SUBSCRIPTION_PURCHASE_INSTL es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php SUBSCRIPTION_RENEW_INDL es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php SUBSCRIPTION_RENEW_INSTL es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php USER_REGISTER es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU
php installEmailTemplate.php USER_VALIDATE es_ES, en_US, fr_CA, fr_FR, it_IT, pt_BR, ru_RU

echo “emails inseridos com sucesso!”

Note: the duplicates generated in the db were deleted