I created a date field in settings/edit profile fields. I used type 'Date'. On page 177 of the manual, I eventually found the note which said that to set values in this date, I need 3 fields in my form: fieldname_DAY_DATE, fieldname_MONTH_DATE, and fieldname_YEAR_DATE. (my field is named next_alert)
HOWEVER ...
Once I tried using this form, I started getting the error page instead of the confirmation page ... with no real details. I found that a second submission always worked, and the recipient was added to the database, but with no mailings subscribed/checked.
Troubleshooting:
I found a log file on the server, under /home/openemm/var/log, called core_stdout.log. (I didn't find anything useful in core_stderr.log.)
I found an entry where RecipientDaoImpl was adding new customer, and my date field was being entered as STR_TO_DATE('14.04.2010' 00:00:00', '%d.%m.%Y %H:%i:%s'). Shortly thereafter, I see a message: SQL State [01004] Error code [0]; data truncation: Data truncated for column 'next_alert' at row 1 .... etc.
Solution:
I eventually investigated the MySQL database, database: openmm, table customer_1_tbl. I found that the built-in fields, creation_date and change_date were type timestamp. But my custom field, next_alert, was type date.
Apparently, a date field can't hold the time values being provided in the code. Since I can't rewrite the code, I revised the database. For my field next_alert, I did:
alter table customer_1_tbl change colulmn next_alert next_alert TIMESTAMP;
That did it. No more error pages.
Suggestion: The system should be changed to declare these custom date fields as timestamp instead of date. Alternatively, fix the insert process to avoid trying to stuff time values into a field that can't hold them.
