OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Prepared Emails

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Prepared Emails

Postby birkok » Mon Apr 12, 2010 5:51 am

I have found that there are total 118 mail templates in the Prepared Emails page
But when I change site locale, there are only 106 mail in same page.

How can I supply missed templates?

Thanks in advance
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: Prepared Emails

Postby jmacgreg » Thu Apr 15, 2010 9:40 am

Hi Cuneyt,

Could you tell me the locales in question? (I'm assuming the former is English, but it'd be nice to dobule-check.) You should be able to use the Translator plugin to add any missing email templates; you will then have to reload the locale.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Prepared Emails

Postby birkok » Thu Apr 15, 2010 10:07 am

Thank you James for your consideration.

The other locale is Turkish.
I have checked again. In the translator plugin, there are 68 email templates for both languages. There was some missing templates but I crated them with copied from original English.

Now in the prepared email page, there are 116 Turkish and 118 English mail templates. I think both language templates must be 118. I cannot find missing two templates to create.

PS. There was 106 Turkish templates formerly. I changed some Turkish templates' subject sentences from Turkish to English, now total 106 templates shown. (this problem still considered in viewtopic.php?f=8&t=5933)
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: Prepared Emails

Postby jmacgreg » Fri Apr 16, 2010 4:27 pm

Hi Cuneyt,

Any chance you could figure out which two emails are missing by comparing the two lists? Let me know, too, which version of OJS you're using.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Prepared Emails

Postby jmacgreg » Fri Apr 16, 2010 4:32 pm

Hi Cuneyt,

Actually, I still think this thread and viewtopic.php?f=8&t=5990&p=22947#p22947 are interconnected. Can you check to see if your Turkish translation is missing any of the following prepared emails: NOTIFICATION; NOTIFICATION MAILLIST; and/or NOTIFICATION_MAILLIST_PASSWORD?

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Prepared Emails

Postby birkok » Sun Apr 18, 2010 12:11 am

I use OJS 2.3.1.2

I have found that in:
Journal Management > Prepared Emails
"EDITOR REVIEW" is missing in locale Turkish.

I did "edit" the template and copied original English text to Turkish translation fields. And reload locale language.
But there is still 118 mails in English template and 116 in Turkish. Two "EDITOR REVIEW" is still missing in locale Turkish.
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: Prepared Emails

Postby birkok » Sun Apr 18, 2010 12:26 am

English prepared email templates. Extra files yellowed.
And Turkish prepared email templates. Total 116

English_Prepared_emails.png
English prepared email templates. Extra files yellowed.
English_Prepared_emails.png (501.28 KiB) Viewed 1912 times
Turkish_Prepared_emails.png
Turkish prepared email templates. Total 116
Turkish_Prepared_emails.png (465.61 KiB) Viewed 1912 times
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: Prepared Emails

Postby birkok » Sun Apr 18, 2010 12:55 am

All of those templates remain in Turkish translation section. (Original English templates copied to)

jmacgreg wrote:Hi Cuneyt,

Actually, I still think this thread and viewtopic.php?f=8&t=5990&p=22947#p22947 are interconnected. Can you check to see if your Turkish translation is missing any of the following prepared emails: NOTIFICATION; NOTIFICATION MAILLIST; and/or NOTIFICATION_MAILLIST_PASSWORD?

Cheers,
James
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: Prepared Emails

Postby jmacgreg » Mon Apr 19, 2010 5:43 pm

Hi Cuneyt,

Interesting -- those two emails are actually holdovers from an older version of OJS, I think. They actually aren't used by OJS 2.3 any more -- so in this case, your Turkish version is actually more up to date than the English, in a weird way. You can delete the English versions if you want, or you can just leave them be. I'm guessing that the templates are just cruft from an older version. Can you confirm with me that this install has indeed been upgraded from a previous version at one point, and is not a fresh install of 2.3.1-2?

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Prepared Emails

Postby birkok » Tue Apr 20, 2010 11:33 pm

Yes, it is updated from 2.2.2. to 2.3.1.2, exactly regarded to update instruction.

And I think, just replacing original English template will be enough. Would you please inform me which files I should replace.
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: Prepared Emails

Postby swing » Wed Apr 21, 2010 6:28 am

Hello,
I think that the default email templates data are not deleted and reinstalled with an upgrade. Just replacing the file won't help (because the data is in the database).
Here is a script that we used:
<?php
define('INDEX_FILE_LOCATION', dirname(dirname(__FILE__)) . '/index.php');
require(dirname(dirname(__FILE__)) . '/lib/pkp/classes/cliTool/CliTool.inc.php');

// Install email template list and data for each locale
$emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
$emailTemplateDao->installEmailTemplateData($emailTemplateDao->getMainEmailTemplateDataFilename('en_US'));
?>
Copy the code above, change the locale (en_US) if necessary and save it as a .php file. Place the file into the directory 'tools' (in the OJS installation directory) and call then 'php tools/scriptfilename.php' from the OJS installation directory. Unfortunately you will have to do it for all languages you are using.
Alec is informed about this problem (but somebody maybe reminds him), so I think PKP will consider this for the next upgrades...
Regards
swing
 
Posts: 144
Joined: Tue Oct 09, 2007 2:59 am

Re: Prepared Emails

Postby birkok » Thu Apr 22, 2010 10:39 am

I run your codes for en_EN and tr_TR at this page:
http://www.insanbilimleri.com/ojs/tools ... lename.php

"EDITOR REVIEW" templates remains and still no notification info send.
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: Prepared Emails

Postby swing » Mon Apr 26, 2010 7:47 am

Hi Cuneyt,
Oh, I am sorry -- I forgot to tell that first the content of two tables should be manually deleted and I also forgot a code line -- I did it when the version 2.3.0 was published so I forgot all the details -- sorry! :-(

Thus, here once again, from the beginning:
Did you customize some email templates? They will be lost if you follow this description, thus remember or copy the changes you did.
Is there a possibility for you to first test all this on a testing system? I've just tested it on my testing system, but...

I've just checked the count of the default emails in the version 2.3.1-2: There are 64 in English and 50 in Turkish (s. locale/en_US/emailTemplates.xml vs. locale/tr_TR/emailTemplates.xml

In order to get a clean new installation the following steps are necessary:
Reset your email customization: Go to the 'Prepared Email' page and click on 'Reset All Templates' -- this will delete all your changes/email text customization.

Then you should delete the content of the tables 'email_templates_default' and 'email_templates_default_data' in your database like this:
DELETE FROM email_templates_default;
DELETE FROM email_templates_default_data;
After this, there are no email templates in your system.

Use this new script like explained in the last posting to install the email templates:
<?php
require(dirname(__FILE__) . '/bootstrap.inc.php');

// Install email template list and data for each locale
$emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');

// comment the next line when changing the locale!!!:
$emailTemplateDao->installEmailTemplates($emailTemplateDao->getMainEmailTemplatesFilename());
$emailTemplateDao->installEmailTemplateData($emailTemplateDao->getMainEmailTemplateDataFilename('en_US'));

?>
The script changed a little bit:
The first line changed -- it changed for the version 2.3.1-2.
The following line (that installs the content for the table 'email_templates_default') is new:
$emailTemplateDao->installEmailTemplates($emailTemplateDao->getMainEmailTemplatesFilename());
This should be done just once, so please don't forget to remove or comment (putting '//' in front of it) this line when you change the locale!!!

I hope it will work and you will have a clean new installation of the default email templates -- you should then have 64 emails in English and 50 in Turkisch. Then you can make changes if necessary.

Best regards
swing
 
Posts: 144
Joined: Tue Oct 09, 2007 2:59 am

Re: Prepared Emails

Postby jheckman » Fri Aug 31, 2012 5:55 am

Sorry for reviving this thread.

I have a journal doing something similar.

This journal noticed that their notification emails are coming up blank.

Where:
_______
Subject: [JOURNALNAME] WELCOME MESSAGE

You have signed up to receive notifications from Journal Name

Please click on this link to confirm your request and add your email address to the mailing list:
http://thejournal.url/whatever

If you wish to stop receiving notification emails, please go to http://thejournal.url/notification/unsubscribeMailList
and enter your email address and password.

Your password for disabling notification emails is: jtGNc238

Editor
________________________________________________________________________
Journal Name
http://thejournal.url
___________

… Was arriving like:
_______________________
Subject: [JOURNALNAME]


________________________________________________________________________
Journal Name
http://JOURNALNAME.mail.server.edu

Notice that it’s blank, has no message at the top, and the URL at bottom is actually the mailserver address with the journal ID tacked to it.

I did some digging, tried a patch, didn’t work, I updated to 2.3.7 with all patches. No dice.

Confirmed, they’re missing from the DB
Anything with Notification as the first word in the template

However, the script above seems like it pulls language file templates for all emails.
Any idea if I can just extract the template I need from the 3 languages I need, rather than all of them, as the rest are customized, in Portugese, which I cannot read.

Thoughts?
jheckman
 
Posts: 12
Joined: Thu Nov 17, 2011 8:10 am
Location: Pittsburgh PA, USA

Re: Prepared Emails

Postby asmecher » Fri Aug 31, 2012 7:31 am

Hi Jason,

This is probably http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=7763.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9214
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 4 guests