HTML agnDB merge failure does not report errors

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

Moderator: moderator

carcus88
Posts: 7
Joined: Tue Nov 14, 2006 1:18 am
Contact:

HTML agnDB merge failure does not report errors

Post by carcus88 »

Most HTML editors will embed double quotes as &quote;
This will cause a problem when adding in a database field into your HTML.

So in the source for the HTML you will end up with

[agnDB column="survey_id"]

Instead of

[agnDB column="survey_id"]

This will cause OpenEMM to die on the backend when doing the SQL select. In the -mailgun.log you will see somthing like

[27.11.2006 17:07:28] DEBUG/dbase/(1/15/35/125): DB-Exec: SELECT cust.customer_id, bind.user_type,cust.firstname,cust.survey_id,cust.,cust.mailtype,cust.honoraria_amount,cust.email FROM customer_1_tbl cust, customer_1_binding_tbl bind WHERE bind.customer_id = cust.customer_id AND (bind.mailinglist_id = 15 AND (bind.user_status = 1 AND bind.user_type IN ('A', 'T')))
[27.11.2006 17:07:28] DEBUG/dbase/(1/15/35/125): DB-Exec failed: java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cust.mailtype,cust.honoraria_amount,cust.email FROM customer_1_tbl cust, custome' at line 1


This error is never shown on the web interface and you have to dig to find out what the problem is. I think OpenEMM should be either displaying this error or allowing you to specify the field using both HTML encoded and unencode quotes. The later seems more user friendly as a user will not have to worry about how the HTML is encoded by their editor.