Bug #54412

Improve default value handling for NULL value fields

Added by Alexander Stehlik almost 6 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2013-12-14
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Currently the default value handling for input fields that can be set to NULL (eval is set to null) is quite inconsistent when creating new records:

  • if mode is set to useOrOverridePlaceholder the field is NULL by default
  • if this setting is not used the default value is a non empty string

Additionally it is not possible to explicitly set a NULL default value.

It would be better to if the mode does not have any influence on the default value but if it is possible to set NULL as default.

When this is handled together with #53662 backward compatibility should not be a problem because currently new records will have NULL values by default but empty strings are stored in the database.

screenshot_tca_config.png View (48.6 KB) Alexander Stehlik, 2014-03-05 23:30


Related issues

Related to TYPO3 Core - Bug #53662: DatabaseConnection INSERTquery does not allow NULL values Closed 2013-11-15
Duplicated by TYPO3 Core - Bug #60487: File References override meta data with empty string per default Closed 2014-07-23

Associated revisions

Revision 6695eddf (diff)
Added by Alexander Stehlik over 5 years ago

[TASK] Unify NULL default value handling

If a field is configured to allow NULL values ("eval" is set to "null")
and the default value in the TCA is explicitly set to NULL the value
will not be converted to a string.

Additionally the mode setting "useOrOverridePlaceholder" will not have
any influence any more on the default value when creating new records.

Resolves: #54412
Releases: 6.2
Documentation: #56584
Change-Id: Ica43a1af33e6f86dd042b66781acc0e9cd904cf9
Reviewed-on: https://review.typo3.org/26408
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Reviewed-by: Oliver Hader
Reviewed-by: Ernesto Baschny
Reviewed-by: Stefan Neufeind
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe

History

#1 Updated by Gerrit Code Review almost 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26408

#2 Updated by Gerrit Code Review almost 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26408

#3 Updated by Gerrit Code Review almost 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26408

#4 Updated by Gerrit Code Review almost 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26408

#5 Updated by Gerrit Code Review almost 6 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26408

#6 Updated by Gerrit Code Review over 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26408

#7 Updated by Gerrit Code Review over 5 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26408

#8 Updated by Gerrit Code Review over 5 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26408

#9 Updated by Alexander Stehlik over 5 years ago

This is how it should look like in the configuration module when default is set to NULL and the patch is applied.

#10 Updated by Alexander Stehlik over 5 years ago

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

#11 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF