[TYPO3-dev] typo3 6.2 - extbase object validator called multiple times
Alex Bigott
a.bigott at pixel-ink.de
Fri May 2 14:53:26 CEST 2014
as i noticed later, this only happens in my 6.2.1 installation.
in 6.1.7 it works as expected. so i guess it might be a bug.
-----Ursprüngliche Nachricht-----
Von: typo3-dev-bounces at lists.typo3.org
[mailto:typo3-dev-bounces at lists.typo3.org] Im Auftrag von Alex Bigott
Gesendet: Mittwoch, 30. April 2014 15:24
An: typo3-dev at lists.typo3.org
Betreff: [TYPO3-dev] typo3 6.2 - extbase object validator called multiple
times
hi,
i am just going through the book "typo3 extbase" from patrick lobacher and i
am having some issues with an object validator.
the validator is working fine and gets called automatically. it is placed
under:
typo3conf/ext/simpleblog/Classes/Domain/Validator/BlogValidator.php
in the validator i add errors using:
$this->result->forProperty('description')->addError(new
\TYPO3\CMS\Extbase\Error\Error('my error message', 1398857830));
if i output the errors in a fluid form, i get each error twice(!) when
using:
<f:form.validationResults for="{object}">
<f:for each="{validationResults.flattenedErrors}" as="errors"
key="propertyPath">
{propertyPath}
<ul>
<f:for each="{errors}" as="error">
<li>
[.]
as i was debugging the validator method i noticed, that i seem to have a
real issue, because the structure:
$this->result->propertyResults->title->parent->propertyResults->title->paren
t->propertyResults..
seems to go on and on and on forever.
as validating like this seems to be a rather common task i would really like
to know what i am doing wrong to cause the validator being called too often
- especially since i am not calling it at all but it is automated by
extbase.
thanks a lot
alex
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
More information about the TYPO3-dev
mailing list