Project

General

Profile

Actions

Bug #106371

open

Problem with CustomElements in the Backend on really slow connections

Added by Frank Berger 2 days ago. Updated 1 day ago.

Status:
Under Review
Priority:
Must have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2025-03-13
Due date:
% Done:

0%

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

Description

in cms-backend the CustomElements (like typo3-formengine-container-files ) might be registered and initialized before the actual markup is loaded, leading to unresponsive interface elements or events/actions not happening.

I was able to reproduce the problem on my Mac by installing the "Network Link Conditioner" preference pane from the XCode Additional Developer tools, and setting my connection to 'Very bad network'

The effect of the problem manifested for me when in cms-backend/Resources/Public/JavaScript/form-engine/container/files-control-container.js the following line is called:

window.customElements.define("typo3-formengine-container-files",FilesControlContainer)

while the concrete form is still loading and the

<typo3-formengine-container-files></typo3-formengine-container-files>

is not in the dom yet. This means this line is called while document.readyState is still loading or the DomReady event is not yet called.

A window.setTimeout mitigated the problem for me for now, but this should rather be part of the initialzation which happens in the DocumentService.ready() promise. Maybe some kind of initialization queue for these kind of CustomElements?

This is not an academic problem, this is a real world problem brought to me by editors which happen to have complicated setups or ancient connections...

The effect on typo3-formengine-container-files is - when it is initialized too early - that you can not open the files, not deleted or hide them. Additionally the insert event is not registered, which means you can open the picker, choose a file, and nothing happens, not even an error..

I had as well reports for this happening to the Datepicker as well, which I guess is registered in a similar way.

This is valid for TYPO3 12 and 13.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #102550: race condition in value-picker initialization Closed2023-11-29

Actions
Related to TYPO3 Core - Bug #102603: link-element initialization race conditionClosed2023-12-05

Actions
Actions #1

Updated by Benjamin Franzke 1 day ago

  • Status changed from New to Accepted
Actions #2

Updated by Benjamin Franzke 1 day ago

  • Related to Bug #102550: race condition in value-picker initialization added
Actions #3

Updated by Benjamin Franzke 1 day ago

  • Related to Bug #102603: link-element initialization race condition added
Actions #4

Updated by Benjamin Franzke 1 day ago

  • Priority changed from Should have to Must have
Actions #5

Updated by Gerrit Code Review 1 day ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88589

Actions #6

Updated by Gerrit Code Review 1 day ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88589

Actions #7

Updated by Gerrit Code Review 1 day ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88589

Actions

Also available in: Atom PDF