Page 1 of 1

Email Templates

Posted: Fri Mar 22, 2024 10:24 am
by ricklincs
I have updated to the latest version of nuBuilder and now I am not showing the button Email Templates on the main menu, only the button Emails (runs nuemaillog).

On updating I noticed error #1067 - Invalid default value for 'eml_created_at' and mariadb did not create table zzzzsys_email_log. I now get Table 'dev.zzzzsys_email_log' doesn't exist from :
===SQL===========

SELECT zzzzsys_email_log_id,eml_created_at,eml_sent_at,eml_state,eml_to,eml_subject,eml_error,eml_table_name,eml_tag,CONCAT(sfo_code, ': ', sfo_description),sus_name,eml_record_id
FROM zzzzsys_email_log LEFT JOIN zzzzsys_user ON zzzzsys_user_id = eml_user_id LEFT JOIN zzzzsys_form ON zzzzsys_form_id = eml_form_id
WHERE (eml_state = '#nuBrowseTitle2_select#' OR LEFT('#nuBrowseTitle2_select#',1) IN ('#',''))
ORDER BY eml_created_at DESC LIMIT 0, 20


Should I be manually adding a button for nuemailtemplates?

Thanks in advance.

Re: Email Templates

Posted: Fri Mar 22, 2024 10:39 am
by kev1n
It should look like this:
email.png

Re: Email Templates

Posted: Fri Mar 22, 2024 11:22 am
by ricklincs
Thanks Kev1n, for some reason I was missing custom code onclick menuEmailClick(this, event) on the object menu_email;
Just need to create the table zzzzsys_email_log in my database then I should be fine. Thanks for your help.

Re: Email Templates

Posted: Fri Mar 22, 2024 11:32 am
by ricklincs
To create zzzzsys_email_log I changed `eml_created_at` datetime DEFAULT CURRENT_TIMESTAMP, to `eml_created_at` timestamp DEFAULT CURRENT_TIMESTAMP, as I was getting an error running the sql of error #1067 - Invalid default value for 'eml_created_at'. Will this cause problems with the email log?

Re: Email Templates

Posted: Fri Mar 22, 2024 11:47 am
by kev1n
You can safely convert the columns eml_created_at and eml_sent_at to timestamps without encountering any problems. I'll update this on Github as well.