Bug #17546

Default values not used in IRRE children

Added by Jeff Segars over 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2007-08-21
Due date:
% Done:

0%

TYPO3 Version:
4.2
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When editing child records using IRRE, the TCA-defined defaults are not used. This is due to a small error in t3lib_tceforms_inline->getRecord().

The getRecord() method calls t3lib_transferdata->fetchRecord($table, $idList, $operation). According to comments on the fetchRecord method, "If $operation is "new", then negative ids are meant to point to a "previous" record and positive ids are PID values for new records. Otherwise (for existing records that is) it is straight forward table/id pairs.".

I updated the call to fetchRecord() so that it passes along the pid when $operation is "new" and this causes defaults to be set properly in my testing.

I'm attaching the one line patch to fix this.

(issue imported from #M6183)

class.t3lib_tceforms_inline.php.diff View (697 Bytes) Administrator Admin, 2007-08-21 01:48


Related issues

Duplicates TYPO3 Core - Bug #17442: Default values defined in TCA not used in IRRE children Closed 2007-07-06

Also available in: Atom PDF