Bug #78158

Story #69617: FormEngine bugs

TcaFlexFetch::initializeDataStructure should not throw an exception

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

-- undefined --
FormEngine aka TCEforms
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


When using TemplaVoilà the pages records get an additional field tx_templavoila_flex, which is by default configured to fetch a datastructure (flexform) from another table.

When creating a completely new table, there is no foreign record available because the field ds_pointerField tx_templavoila_ds is empty or 0.
However, \TYPO3\CMS\Backend\Utility\BackendUtility::getFlexFormDS cannot resolve the flexform array, thus leading to exception 1440506893.

There is a comment in the code:

// If data structure can't be parsed, this is a developer error, so throw a non catchable exception

Unfortunately this is not true during the process of creating records like new pages. In that case, the edit mask should still be available, so the admin or editor can properly configure the datastructure, so in the next step the flexform can be resolved.

Related issues

Related to TYPO3 Core - Bug #79101: InvalidPointerFieldValueException needs to be caughtClosed2016-12-28

Related to TYPO3 Core - Task #78581: Refactor flex form data structure handlingClosed2016-11-05


Updated by Christian Kuhn over 5 years ago

  • Parent task set to #69617

Updated by J. Peter M. Schuler about 5 years ago

Agreed - but shouldn't this specific problem be fixed nevertheless?

Because the DS here is discoverable in most situations (although not in all).

In the case you mentioned, BackendUtility::getFlexFormDS searching for the correct record replaces $row (which has the pid) with $rr - but wie uids like NEWxyz $rr returns always null.
So using $row[$ds_searchParentField] instead of $rr[$ds_searchParentField] could help (at least if $rr is null).
Perhabs on the other hand TYPO3\CMS\Backend\Form\FormDataProvider should be corrected and call BackendUtility::getFlexFormDS with the parameter $newRecordPidValue.


Updated by Alexander Schnitzler over 2 years ago

  • Priority changed from Should have to -- undefined --

Updated by Susanne Moog over 2 years ago

  • Related to Task #78581: Refactor flex form data structure handling added

Updated by Susanne Moog over 2 years ago

  • Status changed from New to Closed

Exception was removed with #78581
further exceptions are caught since #79101

Also available in: Atom PDF