Skip to content

BUG: Deprectated code in vhs/Classes/ViewHelpers/Content /InfoViewHelper.php #1951

@achim71

Description

@achim71

Hello VHS Developers,

I experienced errors related to vhs/Classes/ViewHelpers/Content/InfoViewHelper.php line 136

if (0 !== $languageUid && $GLOBALS['TSFE']->sys_language_contentOL) { $record = $GLOBALS['TSFE']->sys_page->getRecordOverlay( 'tt_content', $record, $GLOBALS['TSFE']->sys_language_content, $GLOBALS['TSFE']->sys_language_contentOL ); }

sys_language_contentOL does no longer exist in typo3 13 and getRecordOverlay is protected.
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-98303-RemovedHooksForLanguageOverlaysInPageRepository.html

Changed it to:

if (0 !== $languageUid && $languageAspect->getLegacyOverlayType()) { $record = $GLOBALS['TSFE']->sys_page->getLanguageOverlay( 'tt_content', $record ); }

Without the fix pages in non default languages produced an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions