georgringer / news

TYPO3 Extension news
GNU General Public License v2.0
265 stars 355 forks source link

Title from MenuProcessor not translated with TYPO3 12 #2236

Closed websi closed 1 year ago

websi commented 1 year ago

Bug Report

Current Behavior The title from MenuProcessor for a translated news show the title of the news at the default language.

Expected behavior/output The title for a translated news shows the title for the current language.

Environment

Possible Solution

Use the new Method getLanguageOverlay instead of "getRecordOverlay" or use the Extbase Repository to get the current News Object.

Our solution ist a own MenuProcessor wich use the Extbase Repository to fetch the News Record.

Additional context

https://github.com/georgringer/news/blob/0099d5b7f07d6cbbbb6b32d38e59e1aba5297944/Classes/DataProcessing/AddNewsToMenuProcessor.php#L106

getRecordOverlay is called with the id of the language instead of the LanguageAspect Object. TYPO3 use the overlay mode "off" for these use case. See https://github.com/TYPO3/typo3/blob/12.4/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php#L705

georgringer commented 1 year ago

The title from MenuProcessor for a translated news show the title of the news at the default language.

you mean: The title from MenuProcessor for a translated news show the title of the default news at the other language.?

websi commented 1 year ago

On the englisch Page the german (Default language) title is shown. Sorry for the inaccurate information.