Project

General

Profile

Actions

Bug #26503

closed

Endtime cannot be removed

Added by José Ricardo almost 13 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-04-29
Due date:
% Done:

0%

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

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

class.t3lib_tcemain_patch.txt (943 Bytes) class.t3lib_tcemain_patch.txt Todd Hossack, 2011-05-18 04:52

Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #28298: TCE form field with range cannot be cleared in some casesClosed2011-07-18

Actions
Actions #1

Updated by Todd Hossack almost 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.

Actions #2

Updated by Dmitry Dulepov over 12 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?

Actions #3

Updated by Alienor.net over 12 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

Actions #4

Updated by Mr. Hudson over 12 years ago

Patch set 1 of change If9b26ef59a061cde006ba97bd9ea4ef5dc5b86b4 has been pushed to the review server.
It is available at http://review.typo3.org/4220

Actions #5

Updated by Susanne Moog over 12 years ago

  • Status changed from Needs Feedback to Under Review
Actions #6

Updated by Gerrit Code Review about 12 years ago

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

Actions #7

Updated by Gerrit Code Review about 12 years ago

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

Actions #8

Updated by Jonas Renggli about 12 years ago

I guess this bug has been resolved in #28298

Actions #9

Updated by Jigal van Hemert about 12 years ago

  • Status changed from Under Review to Closed

Closed as duplicate.

Actions

Also available in: Atom PDF