Bug #60726
__identity field will not be rendered if of type @lazy
Status: | Resolved | Start date: | 2014-08-01 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | Fluid | Spent time: | - | |
Target version: | next-patchlevel | |||
TYPO3 Version: | 6.2 | Is Regression: | No | |
PHP Version: | 5.4 | Sprint Focus: | ||
Complexity: | easy |
Description
Hello Core-Team,
I have a field like that one in my fluid-template:
<f:form.textfield class="powermail_input" placeholder="ss:mm" id="timeBegin" property="eventTime.timeBegin" />
To prevend it from validation I have added the @lazy annotation in domain model. In renderHiddenIdentityField method you have something like:
if (!is_object($object) || !($object instanceof \TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject) || ($object->_isNew() && !$object->_isClone())) { return ''; }
But \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy isn't any type of them, so my required __identity field will not be rendered in template.
Stefan
Related issues
Associated revisions
[BUGFIX] add _loadRealInstance in f:form ViewHelper
If you edit a form containing subproperties of your domain model,
f:form VH will add some hidden fields to identify your related
domain models (__identity).
But in case of @lazy annotations, these fields will not be
rendered because of a missing _loadRealInstance call
in AbstractFormViewHelper object.
Releases 6.3, 6.2
Resolves: #60726
Change-Id: I67864e5b80752ff4350efabc72bd2b0a89d33bad
Reviewed-on: http://review.typo3.org/31934
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
[BUGFIX] add _loadRealInstance in f:form ViewHelper
If you edit a form containing subproperties of your domain model,
f:form VH will add some hidden fields to identify your related
domain models (__identity).
But in case of @lazy annotations, these fields will not be
rendered because of a missing _loadRealInstance call
in AbstractFormViewHelper object.
Releases 6.3, 6.2
Resolves: #60726
Change-Id: I67864e5b80752ff4350efabc72bd2b0a89d33bad
Reviewed-on: http://review.typo3.org/32895
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
History
#1 Updated by Gerrit Code Review about 1 year ago
- Status changed from New 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 http://review.typo3.org/31934
#2 Updated by Gerrit Code Review about 1 year ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31934
#3 Updated by Gerrit Code Review about 1 year ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31934
#4 Updated by Gerrit Code Review about 1 year ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31934
#5 Updated by Christian Kuhn 12 months ago
To prevend it from validation I have added the @lazy annotation in domain model.
Is this sentence correct? If so, @lazy is definately not meant to be used to circumvent validation.
#6 Updated by Stefan Froemken 12 months ago
I know it is for loading domain models when needed. But in case of MM-Tables a @lazy annotation is the best solution to stop validation over nearly ALL mm-records (tested duration: 17 seconds).
#7 Updated by Gerrit Code Review 11 months ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32895
#8 Updated by Stefan Froemken 11 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 66d5ac3ad72e92b4158f9d09cf9ae8e0ca6b03c7.