t3extblog
t3extblog copied to clipboard
German articles available in English site language and vice versa
Hi @fnagel !
Our setup is like this:
- Typo3 version: 9.5.20
- t3extblog version: 5.1.1
- in our system we have multiple different articles in 2 or more languages (separate article per language)
- German is the default language (id 0), English is the first alternative (id 1) and French is the second alternative (id 2)
So, articles that are available in German can be accessed using the same path like the english articles, while exchanging the article slug like /en/customizations/news/das-ist-mein-deutscher-artikel
. The website will have the English translations but the German article.
Same for the English articles, where the url has the German path with the english slug like /anpassungen/neuigkeiten/this-is-my-english-article
.
There are no articles in French, so that is not a problem.
We've set the correct language for all articles in the backend. In the frontend I only get the articles from the chosen language in the listings/overview. That works fine. But there are sometimes links that are being generated that link to that strange mix of site language and article language being different (google shows quite a few of them) and you can also easily access them by putting the changed slug into the address bar of your browser.
My site config:
base: 'https://my-website.at'
baseVariants: { }
errorHandling:
-
errorCode: '404'
errorHandler: Page
errorContentSource: 't3://page?uid=130'
languages:
-
title: Deutsch
enabled: true
base: /
typo3Language: de
locale: de_AT.UTF-8
iso-639-1: de
navigationTitle: Deutsch
hreflang: de-AT
direction: ''
flag: de
languageId: '0'
-
title: English
enabled: true
base: /en/
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
navigationTitle: English
hreflang: en-US
direction: ''
fallbackType: free
fallbacks: '0'
flag: gb
languageId: '1'
-
title: French
enabled: true
base: /fr/
typo3Language: fr
locale: fr_FR.UTF-8
iso-639-1: fr
navigationTitle: Francais
hreflang: fr-FR
direction: ''
fallbackType: free
fallbacks: '0'
flag: fr
languageId: '2'
rootPageId: 1
routes: { }
routeEnhancers:
DceWithDetailpage: # you are free to choose a unique name here
type: Simple
routePath: '/show/{detailDceUid}' # the given argument, must match with set detailpage_identifier
aspects:
detailDceUid: # Same here
type: PersistedAliasMapper
tableName: tt_content
routeFieldName: tx_dce_slug
imports:
-
resource: 'EXT:t3extblog/Configuration/Routes/Default.yaml'
I'm a little bit out of luck with finding the error here. If I can provide any further information, I'm happy to do so.
Thank you very much Felix!
Best wishes Tom
Mhhh. Configuration looks good to me. I need to test this in a locale instance -- which might take some time as I'm in the progress of switching over to Docker instead of VirtualBox VMs.
Might be a core issues as well. Are you able to test if another extension, for example EXT:news works? Testing if this works in TYPO3 10.x would be interesting as well.
I did some quick test with a 9.5 TYPO3 instance and EXT:news which has the same issue. Looks like a core issue to me.
any news on that ? we got the same problem - we even get rendered german article titles on english page-titles in a language dropdown, where there is no translation of a blog article available
@fgerards No, but I'm about to test this again for TYPO3 11. Did you find a way to fix this? How is your language menu built?
@tomhatzer @fgerards Some tickets that might be related:
- https://github.com/georgringer/news/issues/1158
- https://forge.typo3.org/issues/96010
- https://forge.typo3.org/issues/88715
This routing localization behavior is a problem for simple pages too (at least in TYPO3 11.5.8) so this seems related to core issues.
Hey @fnagel
thank you very much for your research on this topic. I'm no longer working with typo3, so I won't be a big help with this in the near future.
Have a great day! 👋