Email_templates_default_data not upgraded in OMP 1.2

Hi,

I upgraded from OMP 1.1.1.1 to OMP 1.2.0, but I still have email templates from OMP 1.1.1.1 in the database (with a variable that is not resolved).

Example:

EDITOR_DECISION_ACCEPT contains “Username: {$authorUsername}” in OMP 1.1.1.1 but not in OMP 1.2.0

emailTemplates.xml in OMP 1.1.1

emailTemplates.xml in OMP 1.2.0

After upgrading from OMP 1.1.1.1 to OMP 1.2.0 I still have

Username: {$authorUsername}

in the database (select body from email_templates_default_data where email_key=“EDITOR_DECISION_ACCEPT” and locale=“en_US”).

Can I reload emailTemplates.xml somehow?

best,
Carola

Hi @carola,

I believe you can via the Site Administrator’s “Languages” form – but it might be less disruptive to check which email templates reference this variable, e.g. by executing the following queries in the DB:

SELECT DISTINCT email_key FROM email_templates_default_data WHERE body LIKE '%{$authorUsername}%';
SELECT DISTINCT email_key FROM email_templates_data WHERE body LIKE '%{$authorUsername}%';

…and then correcting them through the user interface. Just remove that line of text. The reason this change was made is that we’re no longer considering submissions to belong to a single “submitter” account – there may be many authors attached to a submission.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks @asmecher,

since I prefer to have the standard email templates for 1.2.0, I reloaded the locales (on a test version), but this was indeed quite disruptive, so I copied the two tables (email_templates_default…) from a fresh OMP 1.2.0 version.

This seemed to work. Is this okay or does it cause any incongruity?

best,
Carola

Hi @carola,

That should work OK – I can’t think of any data errors that would result.

Regards,
Alec Smecher
Public Knowledge Project Team