femanager icon indicating copy to clipboard operation
femanager copied to clipboard

Overwrite email template does not work (Partials and Layouts work)

Open r12r opened this issue 5 years ago • 3 comments

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.

r12r avatar Dec 18 '19 08:12 r12r

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.

tpinne avatar Oct 02 '20 10:10 tpinne

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.

sbusemann avatar Jul 03 '21 08:07 sbusemann

I am still having the same issue with TYPO3 v11.5 and fe_manager ^7.1. Please reopen

linawolf avatar Jun 07 '23 06:06 linawolf