Bug #90100

Linking cross-site to page uid with different languages doesn't work

Added by Koen Wouters 9 months ago. Updated 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2020-01-13
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have a multi site installation with for each siteroot different languages configured.
Siteroot 1: English (default) and German
Siteroot 2: English (default)

I use the link builder to make a link from an element inside siteroot 1 (German) to a page uid inside siteroot 2. This results in no link in the frontend of siteroot 1 (German), because the german language doesn't exist inside siteroot 2.
What i expect is a link in the frontend of siteroot 1 (German) to the default language of siteroot 2 so i won't miss links in the frontend of siteroot 1. Or i want an option to choose the target language in the link builder, so an editor can choose the target language. For now i am using a bypass by creating an external url to create hard links to the siteroot 2 English, but this is not how this should work in my opinion.


Related issues

Related to TYPO3 Core - Feature #22113: Possibility to link to an explicit language of a page Closed 2010-02-12

History

#1 Updated by Riccardo De Contardi 8 months ago

  • Related to Feature #22113: Possibility to link to an explicit language of a page added

#2 Updated by Riccardo De Contardi 8 months ago

I report an extension that might be of help: https://github.com/CMSExperts/link2language

#3 Updated by Heiko Nöthen 4 months ago

I can confirm that this problem still exists in the current TYPO3 9 version.

Given:
default.de German/de (default) and English
default.en English (default)

If you create a typolink from default.de/en/somesite to default.en/othersite you get no link cause function getSiteLanguageOfTargetPage in PageLinkBuilder.php [1] treats this as an error case. There is no language with the given id in this site. But i think there should be at least an option to set the default language as a default or fallback.

It is great that it is possible in TYPO3 V9 to only activate nessesary languages and to use LanguageMenuProcessor to generate the language menu automaticaly.

Espacialy if there is a site with default English language it makes no sence to additionaly activate the English language in the site configuration. But currently that would be the only build in solution. That would cause thousands of unneeded Urls and the menu couldn't be generated automaticaly. No solution for me.

To solve the problem i currently use the typolinkModifyParameterForPageLinks hook.

Solution ideas:

a) Option to fallback to default

b) Option to fallback to defined language

Example:

Given:
Site A: default German site and English
Site B: default English site and Chinese(zh)

Creating a link from site.b/zh/ to Site A would cause no link. A fallback to default German is not the best solution. So i think there should be an option to fallback to English.

[1] https://api.typo3.org/9.5/_page_link_builder_8php_source.html#l00352

#4 Updated by Francois Suter 2 months ago

I have stumbled on this problem too and I consider it a bug. I think the link generation should fall back to the default language site, because this makes for a better user experience than no link at all.

Also available in: Atom PDF