FluidTYPO3 / vhs

TYPO3 extension VHS: Fluid ViewHelpers
https://fluidtypo3.org
Other
190 stars 229 forks source link

$TSFE->fePreview not usable anymore in TYPO3v11+ #1775

Closed cweiske closed 2 years ago

cweiske commented 2 years ago

vhs uses $TSFE->fePreview in `AbstractRecordResourceViewHelper::getRecord: https://github.com/FluidTYPO3/vhs/blob/12ee8cc2675929b9999f8f034298b7a1f6844ec3/Classes/ViewHelpers/Resource/Record/AbstractRecordResourceViewHelper.php#L170

This generates a deprecation notice on TYPO3 10:

TYPO3 Deprecation Notice: Property $TSFE->fePreview is not in use anymore as this information is now stored within the FrontendPreview aspect. in typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php line 4101

This property has been

Since vhs supports TYPO3 v8 and v9, how should this be handled? Version-specific code for 8-9 and 10+?

NamelessCoder commented 2 years ago

May be solvable with an additional isset() - if not, then a version_compare makes sense.