Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
TYPO3
content_replacer
Commits
c5df5048
Commit
c5df5048
authored
Sep 01, 2020
by
Tim Wagner
Browse files
[BUGFIX] TypoScriptAspect does not exist yet in TYPO3 9
parent
ed5ba8e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Classes/Middleware/ContentReplacerMiddleware.php
View file @
c5df5048
...
...
@@ -39,6 +39,7 @@ use TYPO3\CMS\Core\Context\TypoScriptAspect;
use
TYPO3\CMS\Core\Http\Stream
;
use
TYPO3\CMS\Core\Http\StreamFactory
;
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
use
TYPO3\CMS\Core\Utility\VersionNumberUtility
;
use
TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager
;
use
TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
;
...
...
@@ -195,8 +196,15 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
$typoscriptConfiguration
=
$extbaseFrameworkConfiguration
[
'plugin.'
][
'tx_content_replacer.'
];
}
else
{
if
(
empty
(
$GLOBALS
[
'TSFE'
]
->
tmpl
->
setup
))
{
// we need the TypoScript configuration here, force paring
GeneralUtility
::
makeInstance
(
Context
::
class
)
->
setAspect
(
'typoscript'
,
GeneralUtility
::
makeInstance
(
TypoScriptAspect
::
class
,
true
));
// we need the TypoScript configuration here, force parsing
if
(
version_compare
(
VersionNumberUtility
::
getCurrentTypo3Version
(),
'10.4.0'
,
'>='
))
{
GeneralUtility
::
makeInstance
(
Context
::
class
)
->
setAspect
(
'typoscript'
,
GeneralUtility
::
makeInstance
(
TypoScriptAspect
::
class
,
TRUE
)
);
}
else
{
$GLOBALS
[
'TSFE'
]
->
forceTemplateParsing
=
TRUE
;
}
$GLOBALS
[
'TSFE'
]
->
tmpl
->
start
(
$GLOBALS
[
'TSFE'
]
->
rootLine
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment