Behavior
On a page with a SingleNewsView I added TS for "Latest news" fallback, that works like expected in default Language, but not for translated content.
Instead of news there is this shown "The news record is not available anymore."
This only happens if the latest default news doesent have a translation for that language, what I want is that if the news doesent have a translation it the latest news that HAS a translation is used instead.
Anyone an idea ?
Environment
- TYPO3 version: 10.4.7
- Extension: "tx_news/news": 8.4.0 (already tested newest Version(8.5.2) in ext.Repo)
- Composer Mode: no
Example
in this example only News3 would work in all languages, but when "News 4" was added the latest news in EN would still be "News 3" but it trys to load "News 4" instead.
News | Language
----------- | --------------
News4 | Default- DE
News4 | Lang1 - CN
News3 | Default- DE
News3 | Lang1 - EN
News3 | Lang2 - CN
News3 | Lang2 - PT
News2 | Default- DE
News1 | Default- DE
Typoscript:
#Seperate for the 3 Languages, each works like this one
[siteLanguage("languageId") == "2"]
plugin.tx_news.settings {
overrideFlexformSettingsIfEmpty = singleNews,cropMaxCharacters,dateField,timeRestriction,orderBy,orderDirection,backPid,listPid,startingpoint
useStdWrap = singleNews
singleNews.stdWrap.cObject = CONTENT
singleNews.stdWrap.cObject {
table = tx_news_domain_model_news
select {
max = 1
orderBy = datetime desc
pidInList = 134
sys_language_uid = 2
l10n_parent != 0
}
renderObj = TEXT
renderObj.field = uid
}
}
[global]
question from:
https://stackoverflow.com/questions/65906778/typo3-news-show-single-latest-news-in-all-languages 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…