OJS - Email templates were restored to default


A few weeks ago, we noticed that automatic reminders were not being sent. This had happened before and our tech team fixed it as usual (by activating cron).

Turns out, ever since they did that, the email templates were all restored to the out-of-the-box-default and the any changes the journals made were lost. Is there some way to restore those email templates?

There is another problem, which is, when they try to alter the templates, it saves as it should (meaning no error messages) but the changes are completely ignored by the system. This happens on and off. Sometimes the changes will “stick” and sometimes they won’t.

Thanks in advance!

If you have access to your database, custom emails are stored in a separate email_templates_settings table. If this table is empty (and the email_templates is empty too), then someone has (probably accidentally) reset the templates to default. If that is the case, restoring those custom templates is not possible unless 1° The system administrator has made backups of the db or 2° they were deleted very recently, in which case it might still be retrievable with the appropriate software.

As for the second problem, what does the error log say?

Hello @pheckler, how are you? I checked those tables and both have a lot of information. The templates weren’t reseted. In the first table I got more than 21000 rows and the second I found 2522 rows.

That sounds like a LOT of data, especially for the email_templates table. If I understand the source code on this point, it essentially means that you have custom emails for well over 300 journals, is that correct? If it is and if all these rows match the templates that you were looking for (the content of the templates will be in email_templates_settings), then at least you still have the text. If none of them load to the backend, there is an error somewhere which should appear in the log.

Hi @pheckler,
That’s true, there is a lot of information and maybe the customized templates are there. I generated I file with all rows and @alexxxmendonca realized the number of rows with Portuguese is low than should be. I search for error in apache logs and I didn’t find something about this inconsistency.
This inconsistency appears between two situations: We upgraded to the last version a month ago and enable scheduled_tasks. Is there another thing we can check?
Best Regards,


It should be all there is. Did you have any problem during the upgrade? @Carolina_Tanigushi mentioned a problem when trying to edit templates. This should generate an error either in the log or in the browser inspector that might help to locate the issue (the two are most likely correlated).

Hi @pheckler

I tried it again and still couldn’t replicate.The person who first let us know she was having trouble with saving has also been able to successfully alter the email templates so it seems like this was either a temporary instability or something with the internet connection.

Edit: the issue with saving the templates, that is. The problem with the email templates being restored to default still hasn’t been solved.


That is good for your workflow at least!
As for the templates, does disabling schedule tasks have any effect on the bug?

Hi, @pheckler

We were able to solve the problem by retrieving and restoring the email template tables from an earlier point, though we still haven’t been able to find out what caused this problem in the first place.

Thank you for all the help!

1 Like