FluidTYPO3 / vhs

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

v.6.1.2. error in page type 6 - backend user #1794

Closed birgitberlin closed 1 year ago

birgitberlin commented 1 year ago

1527777868 TYPO3\CMS\Core\Context\Exception\AspectNotFoundException

No aspect named "frontend.preview" found.

at TYPO3\CMS\Core\Context\Context->getPropertyFromAspect('frontend.preview', 'isPreview') in /v.../public/typo3conf/ext/vhs/Classes/ViewHelpers/Resource/Record/AbstractRecordResourceViewHelper.php line 173

    $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);

    if (class_exists('\\TYPO3\\CMS\\Frontend\\Aspect\\PreviewAspect')) {
        //TYPO3 version >= 10
        $fePreview = GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('frontend.preview', 'isPreview');
    } else {
        $fePreview = (bool)(isset($GLOBALS['TSFE']) && $GLOBALS['TSFE']->fePreview);
    }
    if ($fePreview) {

TYPO3 11.5.12 vhs 6.1.2

error in page type 6 - backend module Web - ViewpageView

birgitberlin commented 1 year ago

as in #1714 suggested: A quick workaround is to replace: {v:content.resources.fal(field: 'images', uid: '{record.uid}')} By {v:content.resources.fal(field: 'images', record: '{record}')}

fixes the problem