Bug #78338
openValueObject as parameter in UriBuilder results in uid & pid declaration
0%
Description
Passing a ValueObject as argument to one of the Fluid ViewHelpers for URI-handling will lead to (empty) uid- and pid-declarations in the resulting URI.
This in turn can blow up the property-mapper when it's trying to map the URL's parameters to the method's/action's arguments.
From my point of view the issue happens within `convertTransientObjectToArray()` of \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder as it just takes no care at all about uid and pid but instead just takes every object property:
One could argue that uid and pid don't belong in a ValueObject...
but `AbstractValueObject` extends `AbstractDomainObject` and this already declares uid and pid as a property (whyyy).
As the AbstractValueObject<->AbstractDomainObject constellation is an open mis(t)ery to me, I suggest to take special care of the uid and pid properties within the aforementioned `convertTransientObjectToArray()` implementation.
Thanks.
Updated by Alexander Buch about 8 years ago
Just for the reference, as a workaround i unset uid and pid in the constructor of my ValueObject:
public function __construct() { unset($this->uid); unset($this->pid); }
Updated by Christian Kuhn almost 2 years ago
- Related to Bug #87409: UriBuilder->convertDomainObjectsToIdentityArrays doesn'thandle AbstractDomainObject correclty added