Project

General

Profile

Actions

Bug #78338

open

ValueObject as parameter in UriBuilder results in uid & pid declaration

Added by Alexander Buch over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2016-10-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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:

https://github.com/TYPO3/TYPO3.CMS/blob/7254650107f48732b963d5ef8c6838bdd02ff1bd/typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php#L828

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.


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #87409: UriBuilder->convertDomainObjectsToIdentityArrays doesn'thandle AbstractDomainObject correcltyNew2019-01-11

Actions
Actions

Also available in: Atom PDF