I have the following problem: The language fallbacks do not work for the content of the grid element. The grid element itself (e.g. the headline of it) works as a fallback, but the content is not displayed. Even if I don't translate the page at all and the complete page content falls back to the fallback (then only menu links and hardcoded translations), the problem occurs.
So far I have been able to find little (almost nothing, to be precise) about the problem and would be pleased if someone could give me a push in the right direction.
YAML-Config:
languages:
-
title: Deutsch
enabled: true
languageId: 0
base: /
typo3Language: de
locale: de_DE.UTF-8
iso-639-1: de
navigationTitle: ''
hreflang: ''
direction: ltr
flag: de
-
title: English
enabled: true
languageId: 1
base: en/
typo3Language: en
locale: en_GB.UTF-8
iso-639-1: en
navigationTitle: English
hreflang: en-EN
direction: ltr
fallbackType: fallback
fallbacks: '0'
flag: gb
-
title: Nederlands
enabled: true
languageId: 2
base: nl/
typo3Language: nl
locale: nl_NL.UTF-8
iso-639-1: nl
navigationTitle: Nederlands
hreflang: nl-NL
direction: ltr
fallbackType: fallback
fallbacks: '1,0'
flag: nl
-
title: Polskie
enabled: true
languageId: 3
base: pl/
typo3Language: pl
locale: pl_PL.UTF-8
iso-639-1: pl
navigationTitle: Polskie
hreflang: pl-PL
direction: ltr
fallbackType: fallback
fallbacks: '1,0'
flag: pl
Config:
config {
colCount = 2
rowCount = 1
rows {
1 {
columns {
1 {
name = Left
colPos = 20
allowed {
CType = shortcut,textmedia,iconlist,link-list-teaser,form_formframework
}
}
2 {
name = Right
colPos = 21
allowed {
CType = shortcut,textmedia,iconlist,link-list-teaser,form_formframework
}
}
}
}
}
}
Setup:
tt_content.gridelements_pi1.20.10.setup {
grid-50-50 < lib.gridelements.defaultGridSetup
grid-50-50 {
cObject = FLUIDTEMPLATE
cObject {
partialRootPaths < lib.contentElement.partialRootPaths
templateRootPaths < lib.contentElement.templateRootPaths
layoutRootPaths < lib.contentElement.layoutRootPaths
file = EXT:XXX/Resources/Private/Content/Gridelements/grid-50-50/Template.html
}
}
}
HTML:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:layout name="Gridelements"/>
<f:section name="Main">
<div class="row">
<div class="columns small-12 tablet-6">{data.tx_gridelements_view_column_20 -> f:format.raw()}</div>
<div class="columns small-12 tablet-6">{data.tx_gridelements_view_column_21 -> f:format.raw()}</div>
</div>
</f:section>
</html>
Could you please check
\GridElementsTeam\Gridelements\Plugin\Gridelements::getChildren
and make a debug output of $element there?Usually it should be the UID of the parent container holding the child elements. Within the method, the child language is determined with
$this->languageAspect->getContentId()
, so actually the fallback value should be considered correctly.To check that, make a debug output of getContentId() too.
My current guess is, that either the container ID itself might be wrong or the languageAspect is missing the fallback information.
If they contain the wrong values, please file a bug report at https://gitlab.com/coderscare/gridelements/-/issues