Bug #92249

js: BackendException is invoked incorrectly in TYPO3/CMS/Backend/FormEngine

Added by Benjamin Franzke 3 months ago. Updated 3 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Start date:
2020-09-09
Due date:
% Done:

0%

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

Description

The BackendException class is exported as named (not as default) [1]
export in BackendException.ts, and therefore the module consumer
needs to access the BackendException property of the module.

Once a interactionRequest is missing in the FormEngine cosume() method [2],
the following javascript errors occurs:

FormEngine.js?bust=xxxxxxxxxxxxx:386 Uncaught TypeError: BackendException is not a constructor

[1] https://github.com/TYPO3/TYPO3.CMS/blob/e1ab7023e3ae4c9b1d6674a0974037ccced3841e/Build/Sources/TypeScript/backend/Resources/Public/TypeScript/BackendException.ts#L14
[2] https://github.com/TYPO3/TYPO3.CMS/blob/e1ab7023e3ae4c9b1d6674a0974037ccced3841e/typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js#L387

Note: I don't know how to trigger this, but by unconditially throwing the BackendException exception reveals that the current code is wrong.

#1

Updated by Gerrit Code Review 3 months ago

  • Status changed from New to Under Review

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

Also available in: Atom PDF