Bug #82022

DataHandler doesn't store first record in foreign table as value for new record

Added by Jigal van Hemert over 3 years ago. Updated almost 3 years ago.

Should have
FormEngine aka TCEforms
Target version:
Start date:
Due date:
% Done:


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



+- config
| +- foreign_table = tx_myext_departments
| +- foreign_table_where = ORDER BY tx_myext_departments.department
| +- maxitems = 1
| +- minitems = 1
| +- renderType = selectSingle
| +- size = 1
| +- type = select
+- exclude = 0
+- label = LLL:EXT:myext_metadata/locallang_db.xlf:pages.tx_myext_department

If new pages records are created from the page tree context menu or with the new record wizard the FormEngine (TM) kicks in and correctly selects the first record. If a new page is created by dragging in the page tree the field gets the value 0 which is later on displayed as [ INVALID VALUE ("0") ]

In TYPO3 6.2 the same configuration worked fine when creating new pages by dragging in the page tree. As the DataHandler is directly invoked by Ajax calls when you create a page in the pagetree the problem is most likely located in the DataHandler.


Updated by Oliver Hader almost 3 years ago

  • Category changed from DataHandler aka TCEmain to FormEngine aka TCEforms
  • Status changed from New to Rejected
  • Is Regression changed from Yes to No
What really happened...
  • by using the drag'n'drop functionality to create pages, DataHandler created the record as usual - the according tx_myext_department field was left empty
  • when opening the record in FormEngine of TYPO3 v6.2 automatically the first record was shown (since no other empty items have been defined)
  • it was an (invalid) visualization issue in TYPO3 v6.2 which has been fixed in TYPO3 v7 with the rewrite of the FormEngine - the value is not defined and thus "invalid"

You can verify the behavior by adding and items configuration to TCA like the following, check the field value in the database and reload FormEngine in v6.2 - the selector shows the first item, which obviously could not have been persisted since the field type is integer and the "selected" value is a string.

'items' => [
    ['(anything)', 'I will not be persisted']

Thus, I'm closing this issue since the reason is a bugfix in FormEngine in v7 to outline those things much better - now it's an invalid value which previously was just hidden.

Also available in: Atom PDF