Bug #26503
closedEndtime cannot be removed
0%
Description
On Typo3 4.5.2, when you set the endtime to any record, save and then remove the endtime, it will not be removed, but use today date.
It's caused by this config on TCA of the record (field endtime):
'range' => array (
'upper' => mktime(3, 14, 7, 1, 19, 2038),
'lower' => mktime(0, 0, 0, date('m')-1, date('d'), date('Y'))
)
Probably, when you remove the endtime (it's set to 0) the TCE verifies that it's lower than the "lower" range set above and reset the value to today.
Files
Updated by Todd Hossack over 13 years ago
From what I can see, this happens with records with a range specified in TCA.
Previously, when clearing the date value with a checkbox, the hidden date field would be given the value of '0'. Now, when clearing the date field by clicking on the sprite graphic, the hidden field is set to a blank string ('').
To fix this:
Either set the [column][config][checkbox] values in all the affected TCA config files to '', or patch class.t3lib_tcemain.php->checkValue_input so it checks for blank input before attempting to compare with the ranges specified.
See supplied patch for suggested fix.
Updated by Dmitry Dulepov over 13 years ago
- Status changed from New to Needs Feedback
Cannot find "lower" on pages and tt_content table in TYPO3 4.5.2. Are you sure you are using official core sources?
Updated by Alienor.net over 13 years ago
I cannot find it either in standard tables, but it's a problem for retrocompatibility with existing extensions.
The kickstarter also produce this code by default:
http://forge.typo3.org/projects/extension-kickstarter/repository/entry/trunk/sections/class.tx_kickstarter_section_tables.php#L495
It is found for example in tt_news :
http://forge.typo3.org/projects/extension-tt_news/repository/entry/trunk/tca.php#L41
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change If9b26ef59a061cde006ba97bd9ea4ef5dc5b86b4 has been pushed to the review server.
It is available at http://review.typo3.org/4220
Updated by Susanne Moog over 13 years ago
- Status changed from Needs Feedback to Under Review
Updated by Gerrit Code Review almost 13 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/4220
Updated by Gerrit Code Review almost 13 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/4220
Updated by Jonas Renggli almost 13 years ago
I guess this bug has been resolved in #28298
Updated by Jigal van Hemert almost 13 years ago
- Status changed from Under Review to Closed
Closed as duplicate.