Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEPRECATION in TYPO3v12: SiteLanguage->getTwoLetterIsoCode() #1891

Open
cstrizzolo opened this issue Nov 27, 2023 · 0 comments
Open

DEPRECATION in TYPO3v12: SiteLanguage->getTwoLetterIsoCode() #1891

cstrizzolo opened this issue Nov 27, 2023 · 0 comments

Comments

@cstrizzolo
Copy link

I have checked that the bug exists in the dev-development branch
Yes

I have checked that there are no already open issues or recently closed issues about this bug
Yes

Describe the bug
The following deprecation notice gets added to the deprecation log on TYPO3 v.12.4.8 using vhs v.7.0.1:

Mon, 27 Nov 2023 14:52:50 +0100 [NOTICE] request="e58ca3868b72f" component="TYPO3.CMS.deprecations": Core: Error handler (FE): TYPO3 Deprecation Notice: SiteLanguage->getTwoLetterIsoCode() will be removed in TYPO3 v13.0. Use SiteLanguage->getLocale()->getLanguageCode() instead. in /(...)/typo3_src-12.4.8/typo3/sysext/core/Classes/Site/Entity/SiteLanguage.php line 275

To Reproduce
Although I am not completely sure, I guess this happens when using the following tag in the Fluid templates:

<v:page.languageMenu defaultLanguageLabel="Italian" defaultIsoFlag="it" flagImageType="png" as="menu">

In any case, the deprecated function is used on line 430 in Classes/ViewHelpers/Page/LanguageMenuViewHelper.php:

$result[$language->getLanguageId()] = [
                'label' => $label,
                'iso' => $language->getTwoLetterIsoCode(),
                'flagIdentifier' => $flag
];

Expected behavior
No deprecation notices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant