Could you please attach a patch or Java source code to the following issue: https://sourceforge.net/tracker2/?func= ... tid=848488 ?
I would like to integrate the fix with my customized WebService.
Thanks!
Source code for the WS template copy fix
Moderator: moderator
Re: Source code for the WS template copy fix
Thanks again for this. I have a few comments on the fixed version of the loadTemplate function:ma wrote:Done!
1. Since the clone() method of the Mailing class is now used, every component will be loaded from the template. This includes the text- and HTML-components and the following code from EmmWebservice loadTemplate-function is now useless and can be removed:
Code: Select all
// load template for this mailing
if((tmpComp = template.getHtmlTemplate()) != null) {
aMailing.addComponent(tmpComp);
}
if((tmpComp = template.getTextTemplate()) != null) {
aMailing.addComponent(tmpComp);
}
2. It seems that you might have forgotten to update the newEmailMailingWithReply method with regards to setting description, shortname and company id. The following lines are moved to after the loadTemplate call only in newEmailMailing and not newEmailMailingWithReply:
Code: Select all
aMailing.setDescription(description);
aMailing.setShortname(shortname);
aMailing.setCompanyID(1);
3. The overwrite check of agnText/agnHtml guarded by:
Code: Select all
if(aMailing.getMailTemplateID() == 0)
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Thanks for your detailed feedback! Please see this bug fix at SourceForge:
https://sourceforge.net/tracker2/?func= ... _id=168937
https://sourceforge.net/tracker2/?func= ... _id=168937
OpenEMM Maintainer