Project

General

Profile

Actions

Bug #100833

closed

Translate domain object in list view

Added by Axel Beckert over 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Start date:
2023-05-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Task #101088: Update form-engine.js initializeLocalizationStateSelectorClosed2023-06-15

Actions
Actions

Also available in: Atom PDF