Commit d9e87a7d authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Fixing bug with default template selection

parent e6b98e52
......@@ -324,6 +324,12 @@ class MailTemplateService {
$this->extensionKey, $this->templateName, $this->language, $siteRootId
);
if ($template === NULL) {
$template = $this->templateRepository->findOneByTemplate(
$this->extensionKey, $this->templateName, 'default', $siteRootId
);
}
// if there is a template, prefer those values
if ($template) {
$this->loadTemplateValues($template);
......@@ -347,7 +353,7 @@ class MailTemplateService {
}
}
} elseif (filter_var($template->getToAddress(), FILTER_VALIDATE_EMAIL)) {
$this->setToAddresses($template->getToAddress());
$this->setToAddresses($template->getToAddress());
}
if ($isPreview) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment