Project

General

Profile

Actions

Bug #97448

open

JavaScript from TCA Inline Elements not loaded when fetched dynamically

Added by Tizian Schmidlin about 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2022-04-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
backend
Complexity:
Is Regression:
No
Sprint Focus:

Description

I've stumbled on a bug in the TYPO3 backend which was probably introduced when parts of the backend where refactored and I'm not entirely sure if this is a bug or a feature at the moment.

What used to be possible (at least back in TYPO3 8, so quite some time ago) was that you could build you own TCA field type (this still works, so worries there) where you could decide to load additional RequireJS Modules if you need them. This still works to the extent, that for any field that is instantly displayed (and therefore is part of the main rendering thread of the TYPO3 backend when it is loaded) but for IRRE fields this does not work (anymore?).

I could not pin-point what exactly seems to be the problem, but my tests showed that JavaScript that is included in the payload that comes from the IRRE relation is not executed, at all. Even a simple alert or console.log will not output anything (nor do javascript errors in the payload trigger any error warnings). The same javascript works, if you set collapseAll = 0 in the TCA configuration. This actually solved my immediate issue but I was wondering nonetheless if there was a way to trigger the execution of the javascript in the IRRE payload or if it would normally work but got disabled by some means (probably because of security concerns).

I would understand that executing JavaScript from a payload where you don't have control over in the TYPO3 backend is an undesirable effect but I'd like to have a way (some kind of event that is triggered after an IRRE element is finished loading) that I can listen to, to actually get my javascript running (that would not be triggered by any user interaction).

No data to display

Actions

Also available in: Atom PDF