Task #78581

Refactor flex form data structure handling

Added by Christian Kuhn about 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2016-11-05
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
hard
Sprint Focus:

Related issues

Related to Grid Elements (former official tracker) - now moved to Gitlab! - Task #78582: Adapt to breaking core hook getFlexFormDSClass Resolved 2016-11-06
Related to TYPO3 Core - Task #78616: Refactor suggest wizard Closed 2016-11-08
Related to TYPO3 Core - Bug #78657: getRegisteredFlexForms in AbstractItemProvider throws not catched exceptions Closed 2016-11-11
Related to TYPO3 Core - Bug #78852: Opening be_groups records may throw exception Closed 2016-12-01
Related to TYPO3 Core - Task #69715: Flex: Better encapsulation Closed 2015-09-12

Associated revisions

Revision 9b7fd177 (diff)
Added by Christian Kuhn about 3 years ago

[!!!][TASK] Flex form data structure refactoring

Method BackendUtility::getFlexFormDS() does two things at once:
It finds a data structure by given data (TCA, row, ...) and then
parses it.
This construct gives tons of headaches, since the methods never
exposes where a specific data structure came from and the lookup
mechanism is complex. Especially if a flex form is used in
combination with ajax requests later, the core has massive issues
since the location can not be found out later again.

To solve that, the patch splits getFlexFormDS() into two methods:
First method "FlexFormTools->getDataStructureIdentifier()" gets
TCA and row and locates a specific structure. It returns an
"identifier" that points to that unique data structure. This
identifier can be later hand around easily.
The second method "FlexFormTools->parseDataStructureByIdentifier()"
then gets this identifier again, fetches the data structure the
identifier points to, and parses it.

Change-Id: I38264e8a4a6f956c12e9e50f6039d3d09af0f03a
Resolves: #78581
Releases: master
Reviewed-on: https://review.typo3.org/48212
Tested-by: TYPO3com <>
Tested-by: Claus Due <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

Revision 67ef53e1 (diff)
Added by Christian Kuhn about 3 years ago

[TASK] Refactor suggest wizard JS communication

Transmitting the full $row in suggest wizard was introduced to
find the relevant flex form data structure in the ajax search action
to determine the suggest wizard field configuration

The patch adds the data structure identifier instead, the searchAction()
uses that to fetch the specified flex form data structure directly.

Additionally, field values relevant for the ajax call are now signed with
hmac and checked in searchAction().

Change-Id: Ibb5004d4d11487fe999072999c7ce2f847aac750
Resolves: #78616
Related: #78581
Releases: master
Reviewed-on: https://review.typo3.org/50544
Reviewed-by: Wouter Wolters <>
Tested-by: TYPO3com <>
Reviewed-by: Michael Oehlhof <>
Tested-by: Michael Oehlhof <>
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>

Revision 71e191e2 (diff)
Added by Christian Kuhn almost 3 years ago

[BUGFIX] Opening be_groups records may throw exception

The new flex form data structure handling in more picky and throws
exception if a given data structure identifier can not be resolved.
The FormEngine logic that displays exclude fields of flex forms
has to do some guess work to find possible data structures. This
may fail, resulting in an exception.
The patch changes the according general exception to a specific one,
catches it in the find flex form access rights logic, and adds
more docu on what exactly is happening in this code.

Change-Id: I2b808cbe804ba4ab967c8d95b17c0a12ec65ffd4
Resolves: #78852
Related: #78581
Releases: master
Reviewed-on: https://review.typo3.org/50820
Tested-by: TYPO3com <>
Reviewed-by: Alexander Stehlik <>
Tested-by: Alexander Stehlik <>
Reviewed-by: Alexander Rothmund <>
Tested-by: Alexander Rothmund <>
Reviewed-by: Jan Helke <>
Tested-by: Jan Helke <>

History

#1 Updated by Gerrit Code Review about 3 years ago

  • Status changed from New to Under Review

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

#2 Updated by Gerrit Code Review about 3 years ago

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

#3 Updated by Gerrit Code Review about 3 years ago

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

#4 Updated by Christian Kuhn about 3 years ago

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

#5 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF