Bug #101400
closedGenericObjectValidator throws exception with lazy loaded objects
100%
Description
When a property of an Extbase domain model is lazy loaded but the current value does not exist any more (e.g. related record has been deleted), an exception is thrown when the domain model is validated through the GenericObjectValidator
PHP Warning: Attempt to read property "myProperty" on null in /path/to/typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php line 25
There is a TODO in getPropertyValue()
method in GenericObjectValidator
which says add support for lazy loading proxies, if needed
. The TODO is IMO wrong here, since we already support lazy loaded proxies, but the ObjectAccess::isPropertyGettable
function on the lazy loaded proxy results in loading an object which does not exist any more. Therefore the validator fails with an exception.
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80104
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80104
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80104
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80133
Updated by Torben Hansen over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d762ea3b4e70a01e3516194d248d88c05594acee.
Updated by Stefan Bürk 8 months ago
- Related to Bug #103531: Ensure correct access for LazyLoadingProxy test added