Bug #79101

Story #69617: FormEngine bugs

InvalidPointerFieldValueException needs to be caught

Added by Alexander Schnitzler over 5 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2016-12-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::getDataStructureIdentifierFromRecord tries to resolve the data structure of a record from another record in the database. This is a common practice in TemplaVoilà for instance.

If the identifier is an empty string or 0 (zero), a InvalidPointerFieldValueException is thrown, which is the right thing to do in the mentioned method.
Problem is, that the Exception is not caught in \TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::getDataStructureIdentifier.

The exception says, the problem is most likely a wrong configured TCA, which is not right if there is just no relation (yet) to a datastructure record. Thus, the exception needs to be handled properly during further execution.

Usual use case:
During the localization of a content element, the overlay usually does not get the same identifier value as its parent, thus the whole localization fails.


Related issues

Related to TYPO3 Core - Bug #78158: TcaFlexFetch::initializeDataStructure should not throw an exceptionClosed2016-10-06

Actions
#1

Updated by Gerrit Code Review over 5 years 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/51061

#2

Updated by Gerrit Code Review over 5 years ago

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

#3

Updated by Gerrit Code Review over 4 years ago

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

#4

Updated by Gerrit Code Review over 4 years ago

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

#5

Updated by Gerrit Code Review over 4 years ago

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

#6

Updated by Anonymous over 4 years ago

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

Updated by Alexander Opitz over 4 years ago

Hint:

Copy&Paste elements with such a flexible DS field (as described above) still fails after this patch for elements which do not have a DS selected.
For example in TemplaVoilà all tt_content elements which aren't FCEs of TemplaVoilà.

#8

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF