Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
When modifying an email template (on Admin Tools) the "email_from" field is being saved as empty value. It worked fine on version 20.0.0 but on 20.0.1 & 20.0.2 it fails.
The problem and solutions is very easy @eldy , i think that it was a simple missing fault, just on file
/htdocs/admin/mail_templates.php (line #477)
now appears this:
if ($field == 'topic') {
$_POST['topic'] = GETPOST('topic-'.$rowid);
}
if ($field == 'joinfiles') {
$_POST['joinfiles'] = GETPOST('joinfiles-'.$rowid);
}
if ($field == 'content') {
$_POST['content'] = GETPOST('content-'.$rowid, 'restricthtml');
}
if ($field == 'content_lines') {
$_POST['content_lines'] = GETPOST('content_lines-'.$rowid, 'restricthtml');
}
And it's missing another IF for email_from field:
if ($field == 'email_from') {
$_POST['email_from'] = GETPOST('email_from-'.$rowid);
}
Perhaps you also would like to add somekind of "well-formed email address" check before to save the email... i don't know. But in any case, this simple patch solve the problem saving this field of the email template.
Dolibarr Version
20.0.1 & 20.0.2
Environment PHP
No response
Environment Database
No response
Steps to reproduce the behavior and expected behavior
try to modify an existing email template
set a "From" email address and save changes
modify again the same template and you will see that "From" box is empty
Note: the saving works fine when CREATING a template, but not when MODIFYING it.
Bug
When modifying an email template (on Admin Tools) the "email_from" field is being saved as empty value. It worked fine on version 20.0.0 but on 20.0.1 & 20.0.2 it fails.
The problem and solutions is very easy @eldy , i think that it was a simple missing fault, just on file
now appears this:
And it's missing another IF for
email_from
field:Perhaps you also would like to add somekind of "well-formed email address" check before to save the email... i don't know. But in any case, this simple patch solve the problem saving this field of the email template.
Dolibarr Version
20.0.1 & 20.0.2
Environment PHP
No response
Environment Database
No response
Steps to reproduce the behavior and expected behavior
Note: the saving works fine when CREATING a template, but not when MODIFYING it.
Attached files
No response