No target group content in mail preview?

Use this forum to report bugs and to check for bugfixes and new releases of OpenEMM

Moderator: moderator

markus
Posts: 31
Joined: Tue Oct 24, 2006 1:15 pm

No target group content in mail preview?

Post by markus » Tue Oct 16, 2007 10:19 am

Hello All

I've installed the current version OpenEMM 5.3 (suse).
Afer the setup I created some targetgroups. topic1, topic2. In the mail template I added example entries for each topic i.e. there are place holders HTML-Topic1, HTML-Topic2. The fields topic1, topic2 are numeric (0 or 1, length 1). I added some test recipients with valid topic1/2 values.

When I open the preview of the current mailing all content elements that are assignd to targetgroups are missing. Older OpenEMM Versions show these content elements in the mailing preview window.

Thanks for any hint!

Markus

alex78
Posts: 11
Joined: Mon Jul 02, 2007 12:32 pm
Location: Munich

Bug Confirmation

Post by alex78 » Wed Oct 17, 2007 10:27 am

Hi,

we confirmed this as a bug.
It will be fixed in our next version of OpenEMM, which will be released soon.
For further information check our bugtracker:
http://sourceforge.net/tracker/index.ph ... tid=848488

Thank you for finding this bug!
_________________
The OpenEMM Team

markus
Posts: 31
Joined: Tue Oct 24, 2006 1:15 pm

Post by markus » Thu Oct 18, 2007 1:41 pm

JFYI: I checked the mail preview in OpenEMM 5.1.1 (the vmware img). It seems that this bug affects this earlier version too!

The bug affects the TEXT mail preview too. I created one target group based on a numeric/alphanumeric field and added target group specific content. It seems that the group specific content isn't included in the newsletter mails either! Bug somewhere in the DynCollection/DynContent classes?

EDIT:

console_stdout.log lists some errors concerning the field THEMA_TEST2.

Code: Select all

2007-10-18 14:44:45,504 - Using dialect: org.hibernate.dialect.MySQLDialect
18.10 (14:44:45) TargetImpl - isCustomerInGroup: Sourced file: inline evaluation of: ``return ( AgnUtils.compareString(AgnUtils.toLowerCase(THEMA_TEST2), AgnUtils.toLo . . . '' : Undefined argument: THEMA_TEST2
2007-10-18 14:44:45,567 - isCustomerInGroup: Sourced file: inline evaluation of: ``return ( AgnUtils.compareString(AgnUtils.toLowerCase(THEMA_TEST2), AgnUtils.toLo . . . '' : Undefined argument: THEMA_TEST2
18.10 (14:44:45) OpenSessionInViewFilter - Closing single Hibernate Session in OpenSessionInViewFilter

markus
Posts: 31
Joined: Tue Oct 24, 2006 1:15 pm

Post by markus » Thu Oct 18, 2007 4:50 pm

"AgnUtils.compareString(AgnUtils.toLowerCase" is used in method generateBsh. This is called in in Method isCustomerInGroup in Class TargetImpl.

Here is the connection with the preview.
The class MailingImpl implements getPreview:
getPreview(String input_org, int inputType, int customerID, boolean overwriteMailtype, ApplicationContext con) {
...
while((aktTag=findNextDynTag(output.toString(), con))!=null) {
...
if(aTargetID==0) { // Target fits
contentString=aContent.getDynContent();
break; // stop processing list of content
} else {
if(aTarget.isCustomerInGroup(aBsh)) {
contentString=aContent.getDynContent();
break; // stop processing list of content
}
}
...
}

Maybe this is the problem? The field name "thema_test2" is lower case.
In the generateBsh the field name is UPPER case (THEMA_TEST2), as mentioned in the log file.

In a earlier version 5.1 the fieldname in generateBsh remains as it is.

Code: Select all

tmpBsh.append(this.primaryField);
In the current 5.3 version the field name is converted to uppercase.

Code: Select all

tmpBsh.append(this.primaryField.toUpperCase());
EDIT:

Yes this seems to be the bug. The field name is lowercase when added.
The mail preview stuff tries to fetch the field with uppercase name from the customer_1_tbl. I've changed to field name in the customer_1_table to uppercase.

Code: Select all

ALTER TABLE `customers_1_tbl` CHANGE `thema_test2` `THEMA_TEST2` varchar(1) collate utf8_unicode_ci default 'n'
Now the preview includes the target group specific content elements.

maschoff
Site Admin
Posts: 2206
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

MySQL vs. Oracle

Post by maschoff » Fri Oct 19, 2007 7:59 am

Good job!

To shed some light on this issue: The reason behind this bug is that MySQL uses lower case field names, but Oracle - which we use for our commercial version EMM - insists on upper case field names. So, when we introduce or update a feature for our commercial version which we also want to include in the open source version OpenEMM, we have to adjust the handling of field names.
OpenEMM Maintainer

maschoff
Site Admin
Posts: 2206
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff » Thu Dec 13, 2007 3:35 pm

The bug is fixed in the latest release 5.3.2.
OpenEMM Maintainer

Post Reply