Commit 1b115f68 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Fixing missing pid issue, and defualt lang issue

parent a2b0bb93
......@@ -80,7 +80,7 @@ class MailTemplateService {
/**
* @var string $language
*/
private $language;
private $language = 'default';
/**
* @var boolean $ignoreMailQueue
......@@ -169,7 +169,6 @@ class MailTemplateService {
/** @var TypoScriptSettingsService $typoScriptSettingsService */
$typoScriptSettingsService = $this->objectManager->get(TypoScriptSettingsService::class);
$this->tsSettings = $typoScriptSettingsService->getSettings(0, 'tx_sgmail');
$this->language = $this->tsSettings['templateDefaultLanguage'];
/** @var TemplateRepository templateRepository */
$this->templateRepository = $this->objectManager->get(TemplateRepository::class);
/** @var PersistenceManager persistenceManager */
......@@ -322,6 +321,9 @@ class MailTemplateService {
$pageUid = (int) GeneralUtility::_GP('id');
}
if ($this->pid) {
$pageUid = $this->pid;
}
$siteRootId = BackendService::getSiteRoot($pageUid);
/** @var Template $template */
......@@ -766,7 +768,9 @@ class MailTemplateService {
$templateDirectory .= ucfirst($part);
}
$templateDirectory .= '/';
$templatePath = ExtensionManagementUtility::extPath($extensionName) . self::DEFAULT_TEMPLATE_PATH . $templateDirectory;
$templatePath = ExtensionManagementUtility::extPath(
$extensionName
) . self::DEFAULT_TEMPLATE_PATH . $templateDirectory;
if ($config['template_path']) {
$templatePath = $config['template_key'];
......
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