Extension version: 3.2.2
TYPO3 version: 13.x
PHP version: 8.4
In a multilanguage setup using fallbackType: fallback in site config, content elements inside containers are not rendered in any non-default language on the frontend, even when the container and all its children are fully translated in connected mode.
Switching to fallbackType: free makes the content visible, but this is not an acceptable solution as it disables language fallback sitewide.
Root cause
FrontendContainerFactory::buildContainer() fetches children using:
$conf = ['where' => 'tx_container_parent=' . $record['uid'], ...];
Where $record['uid'] is the UID of the translated container record. This only works if translated child records have tx_container_parent pointing to the translated container UID.
However, TYPO3's connected mode translation workflow stores translated children with tx_container_parent pointing to the default language container UID — not the translated container UID. This is consistent with how l18n_parent works for standard content elements.
The backend ContainerFactory::buildContainer() handles this correctly by fetching children of the default language container and then resolving their translations via l18n_parent:
// connected mode
$defaultRecords = $this->children($defaultRecord, 0);
$childRecords = $this->localizedRecordsByDefaultRecords($defaultRecords, $language);
The frontend factory does not mirror this logic, causing it to find zero children for translated containers in connected mode.
The only partial workaround in FrontendContainerFactory is:
if ($languageAspect->getOverlayType() === LanguageAspect::OVERLAYS_OFF && $record['l18n_parent'] > 0) {
$conf['where'] .= ' OR tx_container_parent=' . $record['l18n_parent'];
}
But this is gated on OVERLAYS_OFF which corresponds to fallbackType: free — it never runs with fallbackType: fallback.
Steps to reproduce
- Set up a multilanguage TYPO3 13 site with a default language and one or more additional languages using
fallbackType: fallback in site config
- Create a container element in the default language with child content elements
- Translate the container and its children in connected mode
- View the page in a non-default language on the frontend — container children are not rendered
- Switch
fallbackType to free — content becomes visible
Content inside translated containers should be visible on the frontend in connected mode with fallbackType: fallback, consistent with how the backend ContainerFactory resolves children.
Suggested fix
FrontendContainerFactory::buildContainer() should detect connected mode (i.e. $record['l18n_parent'] > 0) and mirror the backend logic: fetch children of the default language container, then resolve their translations via l18n_parent, rather than querying by the translated container UID directly.
Extension version: 3.2.2
TYPO3 version: 13.x
PHP version: 8.4
In a multilanguage setup using
fallbackType: fallbackin site config, content elements inside containers are not rendered in any non-default language on the frontend, even when the container and all its children are fully translated in connected mode.Switching to
fallbackType: freemakes the content visible, but this is not an acceptable solution as it disables language fallback sitewide.Root cause
FrontendContainerFactory::buildContainer()fetches children using:$conf = ['where' => 'tx_container_parent=' . $record['uid'], ...];Where
$record['uid']is the UID of the translated container record. This only works if translated child records havetx_container_parentpointing to the translated container UID.However, TYPO3's connected mode translation workflow stores translated children with
tx_container_parentpointing to the default language container UID — not the translated container UID. This is consistent with howl18n_parentworks for standard content elements.The backend
ContainerFactory::buildContainer()handles this correctly by fetching children of the default language container and then resolving their translations vial18n_parent:The frontend factory does not mirror this logic, causing it to find zero children for translated containers in connected mode.
The only partial workaround in
FrontendContainerFactoryis:But this is gated on
OVERLAYS_OFFwhich corresponds tofallbackType: free— it never runs withfallbackType: fallback.Steps to reproduce
fallbackType: fallbackin site configfallbackTypetofree— content becomes visibleContent inside translated containers should be visible on the frontend in connected mode with
fallbackType: fallback, consistent with how the backendContainerFactoryresolves children.Suggested fix
FrontendContainerFactory::buildContainer()should detect connected mode (i.e.$record['l18n_parent'] > 0) and mirror the backend logic: fetch children of the default language container, then resolve their translations vial18n_parent, rather than querying by the translated container UID directly.