Project

General

Profile

Actions

Bug #80459

closed

Missing dependency of various require JS modules on FormEngineValidation

Added by Markus Klein over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Backend JavaScript
Target version:
Start date:
2017-03-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

Some module require the requireJS module FormEngine. Those modules use the "submodule" FormEngine.Validation in their initialization.
The problem is that FormEngine.Validation is initialized in a separate requireJS module "FormEngineValidation", which itself depends on the FormEngine module to be available.

So for requireJS the dependency tree resolves to this:

FormEngine
- FormEngineValidation
- Editor
- ...

As by definition the loading and execution order of modules without dependency is undefined.
Since e.g. Editor specifies a dependency on FormEngine, but uses actually only FormEngineValidation, there can be race conditions, FormEngineValidation is actually not yet there.

This can be reproduced using Chrome 57 (on Windows) on latest master, TYPO3 in dev context and with network throttling set to 2G, caching disabled.
You will receive JS errors in the console where Editor.js is reported to access FormEngine.Validation.validate(), where FormEngine.Validation is undefined.

This is actually totally clear, when inspecting the dependencies close enough.

Actions

Also available in: Atom PDF