team23 / t23_inline_container

Makes b13/containers usable inline again as previously possible with gridelementsteam/gridelements. This is especially useful if you want to use b13/containers in georgringer/news.
GNU General Public License v3.0
4 stars 3 forks source link

Mismatch in tx_container_parent Field Causes Backend Display Issues for Translations #19

Open mkarulin opened 1 month ago

mkarulin commented 1 month ago

Not sure if this is an issue with container or with the t23_inline_container but:

Current Situation:

When translating container contents without t23_inline_container, the tx_container_parent field stores the default language parent ID.

Translated content appears as children of the default language container in the tx_t23inlinecontainer_elements field.

Screenshot 2024-09-12 at 11 28 20

The container translation shows tx_t23inlinecontainer_elements as untranslated.

Screenshot 2024-09-12 at 11 28 28

When adding new elements to tx_t23inlinecontainer_elements in the default language and translating them, existing translations are updated to a new tx_container_parent, which is now the translated container ID. This fixes the backend view.

Regardless of tx_container_parent, the frontend correctly renders translations.

PBahner commented 3 weeks ago

I have this problem too.

Problem

All content elements (original language as well as translated language) are displayed as children of the default language container:

grafik

In the translated container they are shown as untranslated:

grafik

Possible Cause

The problem is caused by incorrect referencing of the container in the child elements.

The b13 container extension will only work correctly if all child elements are referrencing to the default language container (with tx_container_parent in db). The translated nodes must not reference the translated container.

The t23_inline_container does the opposite. The translated childs reference to the translated container.

When I change the tx_container_parent of the translated childs to reference the translated container, the inline elements will be displayed correctly for each language but the translated child will be shown as unused at the bottom of the page:

grafik

h-e-l-l-o-w-o-r-l-d commented 3 weeks ago

Same problem here. A fix would be appreciated, otherwise the extension is not suitable for multilanguage environments like ours. Even worse, b13/container cannot be used to replace f.e. mask, if you have inline use cases.

PBahner commented 3 weeks ago

I looked through the code of the extension. It uses the IRRE inline Element which is working with simple db relations. Due to the way b13/container stores data in the database, this problem could be quite difficult to solve. b13/container are also not planning to change this referencing issue as mentioned here: https://github.com/b13/container/issues/159