Project

General

Profile

Actions

Bug #80459

closed

Missing dependency of various require JS modules on FormEngineValidation

Added by Markus Klein almost 7 years ago. Updated over 5 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 #1

Updated by Gerrit Code Review almost 7 years ago

  • Status changed from Accepted 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/52168

Actions #2

Updated by Markus Klein almost 7 years ago

  • Description updated (diff)
Actions #3

Updated by Markus Klein almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Markus Klein almost 7 years ago

  • Status changed from Resolved to In Progress

Initial patch is replaced by better solution, therefore we reverted it.

Actions #5

Updated by Gerrit Code Review almost 7 years ago

  • Status changed from In Progress 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/52178

Actions #6

Updated by Markus Klein almost 7 years ago

  • Status changed from Under Review to Resolved
Actions #7

Updated by Gerrit Code Review almost 7 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52207

Actions #8

Updated by Gerrit Code Review almost 7 years ago

Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52207

Actions #9

Updated by Markus Klein almost 7 years ago

  • Status changed from Under Review to Resolved
Actions #10

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF