Bug #17551
closedError message when creating a record in draft WS with a "double" field
100%
Description
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)
Files
Updated by Tolleiv Nietsch about 13 years ago
- Category deleted (
Miscellaneous) - Status changed from New to Accepted
- Target version deleted (
0)
Updated by Stefan Neufeind about 13 years ago
- Status changed from Accepted to Under Review
Updated by Stefan Neufeind about 13 years ago
- Status changed from Under Review to Accepted
Updated by Joerg Kummer almost 12 years 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.
Updated by Sascha Egerer over 11 years ago
Looks like this is the same problem like in #31757. I've added this ticket as duplicate
Updated by Gerrit Code Review over 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22935
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22935
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22940
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22940
Updated by Anja Leichsenring about 11 years ago
- Create a record in a workspace that has a float field with a
default value of 0 which is not requried. (See test extension
in forge) - Do not insert anything into the field
- save the record
- You'll get the following error: "These fields are not
properly updated in database: (amount) Probably value mismatch
with fieldtype." - The error occurs because the value "0" is compared as a string
to the value that is written/returned by the database. And that
value is "0.00". String comparison will fail and show you the error
Updated by Gerrit Code Review about 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22940
Updated by Gerrit Code Review about 11 years ago
Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/24582
Updated by Gerrit Code Review about 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/24583
Updated by Anonymous about 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ed4e368b022b7257ed9bb0ea0407dd61cf82669d.
Updated by Michael Stucki almost 11 years ago
- Project changed from 624 to TYPO3 Core
- Category changed from Workspaces to Workspaces