Issue Bug Closed

#100833Translate domain object in list view

Axel Beckert 05/08/23, 12:31 updated 07/09/24, 12:56

Description

When translating a news item within the list module the div layer with the id t3js-ui-block is not removed after loading the item.
Steps to reproduce:

- Open the news item with the base language, which is in my case DE, translate it via language select, or add the it via list module while click on the language flag.
- Edit Forms opens but the overlay stays there and is not hidden after loading the content.

Reason:

Within the form-engine.js the function initializeLocalizationStateSelector is called.

        initializeLocalizationStateSelector: function () {
            document.querySelectorAll(".t3js-l10n-state-container").forEach((e => {
                const t = e.closest(".t3js-formengine-field-item")?.querySelector("[data-formengine-input-name]");
                if (void 0 === t) return;
                const n = e.querySelector('input[type="radio"]:checked').value;
                "parent" !== n && "source" !== n || (t.disabled = !0)
            }))
        },

When changing the line

if (void 0 === t) return;

to

if (void 0 === t || null === t) return;

The error is fixed. So far, however, the error has only appeared in the news.

Reviews 2