[TYPO3-mvc] DateTime Parsing with features.rewrittenPropertyMapper = 1 broken?
Philipp Schiffmann
philipp.schiffmann at fh-hannover.de
Mon Mar 12 13:27:41 CET 2012
Hey,
On 06.03.2012 19:28, Matthias Krappitz wrote:
> Hi,
>
> I found a solution to define the Date and Time format for DateTime
> Fields some time ago for Extbase 1.4.x with
> config.tx_extbase.features.rewrittenPropertyMapper = 1.
I had a very similar problem (validating a string with the format 'd.m.Y
H.i') and tried to solve it with the new propertyManager like you. After
adding the empty __construct()-method I got another annoying error: If I
enter the correct data the propertyManager works fine, but when I enter
any string that doesn't match that format or just let the form field
empty I'll get the following exception:
'#1297759968: Exception while property mapping at property path
"newdate":No converter found which can be used to convert from "string"
to "DateTime".'
I want extbase to do the default redirect to the preceding action like
the errorAction does. But with the new propertyMapper enabled the
process dies before the errorAction is called. I think that happens
because of the convert()-method in Tx_Extbase_Property_PropertyMapper:
it throws the following exception:
'throw new Tx_Extbase_Property_Exception('Exception while property
mapping at property path "' . implode('.', $currentPropertyPath) . '":'
. $e->getMessage(), 1297759968, $e);'
As far as I see that exception is catched nowhere. Am I wrong or is the
new propertyMapper supposed to work on this way? If I am right, has
someone a solution for this problem?
Kind regards,
Philipp Schiffmann
More information about the TYPO3-project-typo3v4mvc
mailing list