Linking cross-site to page uid with different languages doesn't work
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.
#3 Updated by Heiko Nöthen 4 months ago
I can confirm that this problem still exists in the current TYPO3 9 version.
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  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.
a) Option to fallback to default
b) Option to fallback to defined language
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.