Bug #97448
closedJavaScript from TCA Inline Elements not loaded when fetched dynamically
0%
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).
Updated by Riccardo De Contardi about 2 months ago
Is https://forge.typo3.org/issues/93743 related or even the same issue?
Updated by Garvin Hicking about 2 months ago
- Status changed from New to Closed
I believe so, closing in favor of #93743
Updated by Garvin Hicking about 2 months ago
- Is duplicate of Bug #93743: Date picker does not work in IRRE elements if collapseAll is set to true added