Project

General

Profile

Actions

Bug #17551

closed

Error message when creating a record in draft WS with a "double" field

Added by Oliver Klee over 16 years ago. Updated over 5 years ago.

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

100%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

T3X_ux_wstest-0_0_0-z-200708221118.t3x (9.25 KB) T3X_ux_wstest-0_0_0-z-200708221118.t3x Administrator Admin, 2007-08-22 11:25

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #31757: Foreign field as label for relationClosed2011-11-11

Actions
Actions #1

Updated by Tolleiv Nietsch over 12 years ago

  • Category deleted (Miscellaneous)
  • Status changed from New to Accepted
  • Target version deleted (0)
Actions #2

Updated by Stefan Neufeind over 12 years ago

  • Status changed from Accepted to Under Review
Actions #3

Updated by Stefan Neufeind over 12 years ago

  • Status changed from Under Review to Accepted
Actions #4

Updated by Joerg Kummer over 11 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.

Actions #5

Updated by Sascha Egerer over 10 years ago

Looks like this is the same problem like in #31757. I've added this ticket as duplicate

Actions #6

Updated by Gerrit Code Review over 10 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

Actions #7

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22935

Actions #8

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22940

Actions #9

Updated by Sascha Egerer over 10 years ago

#31757 is a different problem.

Actions #10

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22940

Actions #11

Updated by Anja Leichsenring over 10 years ago

Steps to reproduce:
  • 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
Actions #12

Updated by Gerrit Code Review over 10 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22940

Actions #13

Updated by Gerrit Code Review over 10 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

Actions #14

Updated by Gerrit Code Review over 10 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

Actions #15

Updated by Anonymous over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #16

Updated by Michael Stucki over 10 years ago

  • Category set to Workspaces
Actions #17

Updated by Michael Stucki over 10 years ago

  • Project changed from 624 to TYPO3 Core
  • Category changed from Workspaces to Workspaces
Actions #18

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF