OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Error in mail to Registration Manager in Spanish

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

Moderators: jmacgreg, michael, John

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

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. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

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 OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

Error in mail to Registration Manager in Spanish

Postby acardona » Mon Jul 14, 2008 12:41 pm

Hi,

we have set OCS 2.0.0.1 to work both in English and Spanish, with Manual Registration.

When a user registers setting OCS to work in English, the Registration Manager receives a mail whose body describes the username, amount to be paid, etc. However, when the user sets OCS to work in Spanish, the mail received by the Registration Manager is blank (only the signature of the Congress appears).

Do you know where the error could be?

Best regards,


Alberto
acardona
 
Posts: 15
Joined: Tue Apr 29, 2008 9:23 am

Re: Error in mail to Registration Manager in Spanish

Postby jmacgreg » Tue Jul 15, 2008 11:46 am

Hi Alberto,

Is this the only email that is being sent out blank? You may want to take a look at the email templates file in dbscripts/xml/data/locale/es_ES/email_templates_data.xml and compare it to the one in the en_US directory. You can also look up the email template under Prepared Emails, and you should be able to enter/edit/add text in Spanish as well, including the template snippets (stuff like {$reviewerName}).

Let me know how it goes,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Error in mail to Registration Manager in Spanish

Postby acardona » Tue Jul 15, 2008 12:15 pm

Hello James,

all mails are sent out correctly. The only one that is not working properly is this one.

By the way, I noticed that the phrases which are used to build the mail to the Registration Manager appear in "ocs-2.0.0-1\plugins\paymethod\manual\data.xml", which seems to be not translated under the "locale" mechanism.

I do not bother to receive this mail in English, since it is just an indication that the user has registered to the system. The problem is that we receive a blank message, without any data of the user. If the user instead sets ocs to work in English, the mail is correctly built. I guess that the same behavior might happen with other languages as well.

Thanks for your help,


Alberto
acardona
 
Posts: 15
Joined: Tue Apr 29, 2008 9:23 am

Re: Error in mail to Registration Manager in Spanish

Postby jalperin » Tue Jul 15, 2008 1:15 pm

Alberto,

You are right. This seems to be a bug in OCS (and OJS too, for that matter). Below is what you need to add to the data.xml file (I did a very quick translation, so you may want to check it over) with the default data also in spanish.

You can replace the data.xml file in the plugin with this one and then execute this from the command line:
Code: Select all
php tools/dbXMLtoSQL.php -data execute plugins/paymethod/manual/data.xml


That should load the default email template data in for you. Alternatively, you can go through the interface to the email templates and add in the value for the email template named MANUAL_PAYMENT_NOTIFICATION and add in the content (while in the spanish locale).

I apologize, but I haven't had a chance to test this carefully (I'm on the move at the moment) but I see no reason why it should not work. Give it a try and let us know.

Good luck!

--- to be added below </row> in the email_templates_default_data table --
Code: Select all
      <row>
         <field name="locale">en_ES</field>
         <field name="email_key">MANUAL_PAYMENT_NOTIFICATION</field>
         <field name="subject">Notificación de Registro</field>
         <field name="body">Un pago manual debe ser procesado para el congreso {$schedConfName} y el usuario {$userFullName} (nombre de usuario "{$userName}").

Se está pagando "{$itemDescription}".
El costo es {$itemCost} ({$itemCurrencyCode}).

Este mail fue generado por el Plugin de Pagos Manuales de Open Conference Systems.</field>
         <field name="description">Esta plantilla de mail se usa para notificar al contacto de registros del congreso que se ha pedido un pago manual.</field>
      </row>
jalperin
 
Posts: 156
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: Error in mail to Registration Manager in Spanish

Postby acardona » Tue Jul 15, 2008 4:05 pm

Dear Juan Pablo,

we have tried with your suggestion of modifying data.xml and afterwards running the php command, but it did not work. We tried by cleaning cache, templates, etc, but we got always the same blank mail sent to the Registration Manager. A side-effect was that now, also when working in English, the sent mail was blank...

Also, we tried using the interface to the email templates and add a new value for the email template named MANUAL_PAYMENT_NOTIFICATION, with the suggested body. Again, we got blank mails to the Registrant Manager. However, when we inspected the database by using mysql, we found the mail contents under the MANUAL_PAYMENT_NOTIFICATION in the email_templates and email_templates_data tables (the corresponding values in the email_templates_default_data table was empty).

Are we missing anything ?


Thanks a lot for your help,


Alberto
acardona
 
Posts: 15
Joined: Tue Apr 29, 2008 9:23 am

Re: Error in mail to Registration Manager in Spanish

Postby jmacgreg » Tue Jul 15, 2008 5:58 pm

Hi Alberto,

I've posted this as a bug: http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=3686. Please Cc yourself to that report: you will receive an email whenever there is any discussion related to this issue, and hopefully a solution will be reached soon.

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

Re: Error in mail to Registration Manager in Spanish

Postby jalperin » Tue Jul 15, 2008 9:04 pm

Alberto,

I think I have found the problem. I will the changes that need to be made in the morning, once I have had a chance to test them.

Thanks for your patience.
jalperin
 
Posts: 156
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: Error in mail to Registration Manager in Spanish

Postby jalperin » Wed Jul 16, 2008 4:55 am

Alberto,

First, go in through the English interface to edit the email templates as we
did before. You have to do it through the english interface of the email will not show up.

Then, you will have to edit the file: classes/mail/EmailTemplateDAO.inc.php.
Inside of the function getEmailTemplate, you have to remove the following (in the
second set of SQL statements):

Line 177:
Code: Select all
 LEFT JOIN email_templates_default AS d ON (e.email_key =
d.email_key)

and
Line 178:
Code: Select all
 d.email_key IS NULL AND


(line numbers may not match exactly, but I pulled from CVS the ones for OCS
2.0.1

Hope that helps
jalperin
 
Posts: 156
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: Error in mail to Registration Manager in Spanish

Postby acardona » Thu Jul 17, 2008 6:47 am

Hi Juan Pablo,

sorry for not answering before. I couldn't try it yesterday.

I made all the changes you proposed, and I get always the same behavior (blank mails to the Registration Manager). Some people have filled the "signature" field, and when doing tests I noticed that this field is sent within the mail (don't know if this could help you for diagnose).

Also, even when charging the mail using the English interface, the mail does not appear afterwards listed in the interface. However, if we try to charge it twice, the system tells you that the key MANUAL_PAYMENT_NOTIFICATION is already present in the system.

May be I am missing an important bug correction...

Many thanks for your cooperation,


Alberto
acardona
 
Posts: 15
Joined: Tue Apr 29, 2008 9:23 am

Re: Error in mail to Registration Manager in Spanish

Postby jalperin » Thu Jul 17, 2008 7:03 am

Alberto,

Have a look at the tables email_templates and email_templates_data. email_templates must have only one row for MANUAL_PAYMENT_NOTIFICATION and email_templates_data should have no more than one per language. Its possible than in our earlier attempts we added additional rows.
jalperin
 
Posts: 156
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: Error in mail to Registration Manager in Spanish

Postby acardona » Thu Jul 17, 2008 9:37 am

Juan Pablo,

may be there is an error here... The email_templates table show only one row for MANUAL_PAYMENT_NOTIFICATION, but the email_templates_data table is empty... Is it correct?

Regards,

Alberto
acardona
 
Posts: 15
Joined: Tue Apr 29, 2008 9:23 am

Re: Error in mail to Registration Manager in Spanish

Postby jalperin » Thu Jul 17, 2008 9:51 am

Alberto,

This is definitely the problem now. We have to clean up a bit of the mess in the database manually. Let me know if you need some help with these steps:
1) In the table email_templates_default_data: delete the row for locale = es_ES for email_key = MANUAL_PAYMENT_NOTIFICATION
2) in the table email_templates: delete all rows for email_key = MANUAL_PAYMENT_NOTIFICATION
3) in the table email_templates_data: delete all rows for email_key = MANUAL_PAYMENT_NOTIFICATION (I think you said you had none here, which is good).
4) Once you've done these, go (in English) to Conference Manager -> Prepared Emails and EDIT the email for MANUAL_PAYMENT_NOTIFICATION with the text in both english (above) and spanish (below).

Please note that this whole thing is caused by a bug in OCS that should be fixed for the next release. Let me know if this helped.

Good luck!
jalperin
 
Posts: 156
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: Error in mail to Registration Manager in Spanish

Postby acardona » Thu Jul 17, 2008 11:00 am

Juan Pablo,

YES !!!! It worked OK !

If I understand ok, the necessary steps were:

1) Delete the MANUAL_PAYMENT_NOTIFICATION rows as requested
2) Enter the new e-mail template for this entry (we used the English interface, but it still does not appear listed in the interface... dont know why)

Now, when we register either under the English or Spanish interface, in both cases the e-mails are sent correctly to the Registrations Manager.


Thanks a lot for you help !


Alberto
acardona
 
Posts: 15
Joined: Tue Apr 29, 2008 9:23 am

Re: Error in mail to Registration Manager in Spanish

Postby solidrockit » Fri Jan 29, 2010 5:05 am

Hello,

We have an OCS 2.1.2 where code changes detailed in the bug http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=3686 where already included.

But, anyway, we were receiving empty registration notification e-mails when the user language was either spanish or basque.

In that case the solution is:

1) go to "Home--> conference --> Site management -->Prepared e-mails" in ENGLISH (otherwise MANUAL_PAYMENT_NOTIFICATION is not showed)

2) Edit an add to the template "basque", "spanish", "french" ... , whatever language your conference deals with.

Now it is working fine. We receive registration notification e-mails in basque and spanish.

By the way, one little question:

- Right now we have to translate this MANUAL_PAYMENT_NOTIFICATION template for each conference.
- Is there a way to translate it only once for every conference?

Many thank and best regards

Iñigo
__
Solid Rock IT
Your IT deparment
http://www.solid-rock-it.com
solidrockit
 
Posts: 1
Joined: Fri Sep 11, 2009 1:26 am

Re: Error in mail to Registration Manager in Spanish

Postby jmacgreg » Thu Feb 04, 2010 10:47 am

Hi Iñigo,

To do this you will have to translate the English email data XML files within your system, and then reload the data. You can use the Translator plugin to help you with this (found within Journal Management -> System Plugins -> Generic Plugins); or you can copy and translate the file manually. The file you want to look at and copy is dbscripts/xml/data/locale/en_US/email_templates_data.xml -- just create an es_ES folder, copy the file to that folder, and translate it. You will then have to reload that particular locale from the Site Administrator -> Languages page.

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

Next

Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests