femanager
femanager copied to clipboard
Overwrite email template does not work (Partials and Layouts work)
I tried to overwrite the email template and came across a possible bug.
Typoscript Constants:
plugin.tx_femanager {
view {
templateRootPath = EXT:foobar/Extensions/femanager/Resources/Private/Templates/
partialRootPath = EXT:foobar/Extensions/femanager/Resources/Private/Partials/
layoutRootPath = EXT:foobar/Extensions/femanager/Resources/Private/Layouts/
}
}
Partials and layout works as expected, but the template path is not overwritten.
I debugged the extension and probably found the problem:
share/web/typo3conf/ext/femanager/Classes/Utility/TemplateUtility.php
getTemplateFolders :
For templates, the parameter $returnAllPaths is true.
This means that a hard coded path is always written to the list of templates with the highest priority:
if ($returnAllPaths || empty($templatePaths)) {
$templatePaths[] = 'EXT:femanager/Resources/Private/' . ucfirst($part) . 's/';
}
When I comment out the lines, it works. Can anyone confirm the bug? Then I'd take another look at the place and create a patch.
We have a similar issue. We're currently on an old setup with TYPO3 8.7.x and femanager 2.6.2.
https://github.com/in2code-de/femanager/blob/ff97c510830f350a78638abf0f969a271ab392fc/Classes/Utility/TemplateUtility.php#L42-L47
At line 47 $configuration['view'] is NULL. There is no path setting at all available and therefore just the hardcoded fallback. But I don't know why the TYPO3 ConfigurationManager does not get all settings at that point.
It works in the current version. I won't back port it for older version. If you like to sponsor is, we can check it in older versions - ask for an offer.
I am still having the same issue with TYPO3 v11.5 and fe_manager ^7.1. Please reopen