#78338ValueObject as parameter in UriBuilder results in uid & pid declaration
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.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 3
-
Alexander Buch commented 10/19/16, 10:07
-
Christian Kuhn changed Related to #87409 01/30/23, 13:03
-
Georg Ringer commented and changed status
NewClosed 04/18/25, 06:14I stumbled across this issue and closing it as ValueObject all properties need to be handed over. TBH I would prefer doing it as json encoded or maybe even persist it internally and move that around.
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); }