Project

General

Profile

Actions

Bug #79411

closed

TCA eval => 'date' fails with error

Added by Jens Engelmann about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-01-22
Due date:
% Done:

0%

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

Description

Any TCA field with the "date" (not datetime) eval function (e.g. the archive field of tx_news) fails when saving with the following error:

DateTime::__construct(): Failed to parse time string (2017-01-22T14:37:13+) at position 19 (+): Unexpected character

As you can see the form value for the date is missing the timezone information the PHP DateTime class needs. It might be a problem with the datepicker library.

Workaround: register own eval function and readd timezone information.

Actions #1

Updated by Susanne Moog about 7 years ago

Hey,

make sure that you don't have any length limitation issues for that field (I've seen the same error happen once, where the field was configured to be 20 chars max). Maybe that could be your problem, too?

Actions #2

Updated by Jens Engelmann about 7 years ago

Works like a charm... thank you very much.

Actions #3

Updated by Georg Ringer about 7 years ago

  • Status changed from New to Resolved
Actions #4

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF