Error message when creating a record in draft WS with a "double" field
|Priority:||Should have||Due date:|
|TYPO3 Version:||4.1||PHP Version:||5.1|
Steps to reproduce:
1. Install the attached extension ux_wstest. It basically creates a new database table including this line of SQL:
amount decimal(7,2) DEFAULT '0.00' NOT NULL,
... and these lines in tca.php:
'config' => array(
'type' => 'input',
'size' => '8',
'max' => '8',
'eval' => 'double2',
'checkbox' => '0.00',
'range' => array(
'upper' => '99999.99',
'lower' => '0'
'default' => 0
2. In the live WS, go to a system folder and create a test record. (This works fine.)
3. Switch to the draft WS.
4. Edit and save the just-created record, creating a new version. (This works as well.)
5. Create and save a new record, using e.g. an amount of "1.23". The record will be saved correctly, but the following error message will be displayed nontheless:
102: These fields are not properly updated in database: (amount) Probably value mismatch with fieldtype.
I suppose the problem may occur when the placeholder record is created, trying to write an empty string into the DECIMAL field. (This is just a guess; I haven't looked that up yet.)
(issue imported from #M6194)
Updated by Tolleiv Nietsch over 1 year ago
- Category deleted (
- Status changed from New to Accepted
- Target version deleted (
Updated by Joerg Kummer 4 months ago
Same issue in own extension for table fields from inline record elements, wich containing evaluation settings in TCA field configuration. Fx:
$TCA[TABLE_NAME_MAINRECORDS]['columns'][CHILDRECORD]['config']['type'] = 'inline';
$TCA[TABLE_NAME_MAINRECORDS]['columns'][CHILDRECORD]['config']['foreign_table'] = TABLE_NAME_CHILDRECORDS;
$TCA[TABLE_NAME_CHILDRECORDS]['columns']['date']['config']['eval'] = 'datetime';
This works fine in TYPO3 v4.5.22:
- Live edits and creates
- Workspace edits
- Workspace creates of main records (including fields with evaluation)
This works throw error in TYPO3 v4.5.22:
- Workspace creates of child records (including fields with evaluation)
But correct value is written to both inserts with t3ver_label 'INITIAL PLACEHOLDER' and 'First draft version'.
The reason are located for DB-inserts in t3lib_tcemain::process_datamap(), where new version placeholder fields will first be written with string like '[PLACEHOLDER, WS#' . $this->BE_USER->workspace . ']' (see class.t3lib_tcemain.php, line 889). And after that, rewritten with current values from user input.
No workaround found yet.