Commit f5b46442 authored by Matthias Adrowski's avatar Matthias Adrowski
Browse files

[TASK] Fix wrong stdwrap reading without given stdwrap

parent f811bfbb
......@@ -98,13 +98,6 @@ abstract class AbstractParserService {
*/
protected function prepareReplacementTerm($replacement, $stdWrap, $termName) {
$cObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
if (TYPO3_MODE === 'BE') {
$configurationManager = GeneralUtility::makeInstance(BackendConfigurationManager::class);
$extbaseFrameworkConfiguration = $configurationManager->getTypoScriptSetup();
$typoscriptConfiguration = $extbaseFrameworkConfiguration['plugin.']['tx_content_replacer.'][$stdWrap . '.'];
} else {
$typoscriptConfiguration = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_content_replacer.'][$stdWrap . '.'];
}
if ($replacement !== '') {
$replacement = $cObject->parseFunc($replacement, $this->parseFunc);
......@@ -112,6 +105,13 @@ abstract class AbstractParserService {
}
if ($stdWrap !== '') {
if (TYPO3_MODE === 'BE') {
$configurationManager = GeneralUtility::makeInstance(BackendConfigurationManager::class);
$extbaseFrameworkConfiguration = $configurationManager->getTypoScriptSetup();
$typoscriptConfiguration = $extbaseFrameworkConfiguration['plugin.']['tx_content_replacer.'][$stdWrap . '.'];
} else {
$typoscriptConfiguration = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_content_replacer.'][$stdWrap . '.'];
}
$replacement = $cObject->stdWrap(
($replacement === '' ? $termName : $replacement),
$typoscriptConfiguration
......
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