Bug #82756
closedCan't remove access starttime / endtime
Added by Mike van Dee about 7 years ago. Updated about 6 years ago.
100%
Description
I can't remove the access start and endtime of tt_content block.
Create a tt_content block. Set start and or end time under the access tab. Save it. When you remove the start or end time an error will popup.
2: SQL error: 'Incorrect integer value: '' for column 'starttime' at row 1' (tt_content:44)
I use typo3 version 8.7.7
Updated by Michael Stucki about 7 years ago
- Project changed from 9 to TYPO3 Core
- TYPO3 Version set to 8
Updated by Susanne Moog about 7 years ago
- Category set to FormEngine aka TCEforms
Updated by Wouter Wolters about 7 years ago
- Status changed from New to Needs Feedback
This works on my system. Looks like your column in the database has a wrong default value or some hook is involved.
Can you setup a clean TYPO3 and try again?
Updated by Mike van Dee about 7 years ago
Wouter Wolters wrote:
This works on my system. Looks like your column in the database has a wrong default value or some hook is involved.
Can you setup a clean TYPO3 and try again?
I use strict MySQL(5.7.17) database.
The tt_content table has fields:
`starttime` int(10) unsigned NOT NULL DEFAULT '0',
`endtime` int(10) unsigned NOT NULL DEFAULT '0',
When you clear the start/endtime an empty string('') is send to the database.
Clearing start/endtime works in typo3 version 8.7.1 or lower. And gives me an error on version 8.7.2 and higher.
Updated by Tymoteusz Motylewski about 7 years ago
- Related to Bug #78921: Copying records fails with SQL error without any message added
Updated by Wouter Wolters about 7 years ago
- Has duplicate Bug #82872: Unassigning "date" from content element is not possible added
Updated by Wouter Wolters about 7 years ago
- Status changed from Needs Feedback to Accepted
Was confirmed by Andreas F.
Updated by Wouter Wolters almost 7 years ago
- Has duplicate Bug #83648: Emptying datetime causes SQL error added
Updated by Daniel Siepmann almost 7 years ago
As far as I know, TYPO3 does not work with MySQL strict mode.
I can't find where it's documented, but we do not experience the same issue if we turn off strict mode.
Updated by Mike van Dee almost 7 years ago
Daniel Siepmann wrote:
As far as I know, TYPO3 does not work with MySQL strict mode.
I can't find where it's documented, but we do not experience the same issue if we turn off strict mode.
Here is an forge task that implies that typo3 supports MySQL Strict mode. https://forge.typo3.org/issues/72610
Updated by Rick Feuerabend almost 7 years ago
as a workaround adding "int" eval additionally does the trick!
with that datetime or date fields can be set empty without MySQL Error
e.g.
$GLOBALS['TCA']['tt_content']['columns']['starttime']['config']['eval'] .= ',int';
Can someony please apply the fixes in the core?
Updated by Oliver Hader over 6 years ago
- Category changed from FormEngine aka TCEforms to DataHandler aka TCEmain
Updated by Gerrit Code Review over 6 years ago
- Status changed from Accepted 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/56062
Updated by Gerrit Code Review over 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/56062
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56064
Updated by Oliver Hader over 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cb59ac9dd7ba7f76fe43c024c03f22968be9bba3.
Updated by Rudy Gnodde over 6 years ago
- % Done changed from 100 to 0
Shouldn't this actually be fixed instead of using the workaround in the core? This patch doesn't fix it for extensions that also use datetime fields. I'm not very familiar with the DataHandler, but can't you cast it to int or set it to zero if a field has eval date/datetime and the value is an empty string?
Updated by Markus Klein over 6 years ago
- Related to Task #72610: Officially support MySQL Strict Mode added
Updated by Markus Klein over 6 years ago
- Status changed from Resolved to Accepted
- Complexity set to hard
We reopen this ticket.
The issues we are facing currently are:
- MySQL in strict mode does not accept an empty string written to an integer database field
- The TCA default value is only applied to fields on creation of new records, not when updating one. (E.g. removing an endtime)
- Writing a correct integer value to a database that uses another datatype for this field (e.g. a
varchar
) will fail on certain DMBS too, for instance MS SQL Server - FormEngine currently does not support
NULL
values for these fields (NULL
means "unknown / undefined", whereas0
has a defined meaning for (date)time), which would be the correct value when not specifying a date.
The solution to all these problem is not doable with a bugfix but requires a more thorough refactoring to the core.
Due to these reasons we applied a workaround as a first counter-measure to the core, but for your extensions you have to apply the workaround as well.
Updated by Oliver Hader over 6 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset 1751567b4d559bd05b759b1dac8554c9aca8ae09.
Updated by Oliver Hader over 6 years ago
- Related to Bug #63735: High memory consumption in DataHandler->checkValue_SW while bulk inserting added