[Flow] No unique path segment could be found after 100 iterations
Bastian Waidelich
bastian at typo3.org
Mon May 26 10:34:40 CEST 2014
Adriano Fialho wrote:
Hi Adriano,
> I have the follow error?
> *"No unique path segment could be found after 100 iterations".*
>
> I identify that the framework class
> "TYPO3\Flow\Mvc\Routing\IdentityRoutePart" has a "resolveValue" method that
> try to resolve an entity with max 100 iterations.[...]
The Identity-RoutePart handler basically converts an entity to a unique
string that can be used in the URL, vice versa.
By default it therefore uses the unique identifier of an entity (usually
the UUID) thus the mapping is unambiguous.
By specifying the "uriPattern" option of the Identity-RoutePart you can
however use any property on the entity. For example if you have a user
"John Doe" it might create the last part of
"http://yourdomain.tld/users/john-doe".
But in this case the "uniqueness" is not guaranteed and if there's
another user with the same name it must not re-create the same string
but "john-doe-1". If you have 100 users with the same name, you'll run
into trouble and should rethink the "uriPattern" option (and change it
from "{firstName}-{lastName}" to something more unique like "{username}"
for instance).
Best,
--
Bastian Waidelich
More information about the Flow
mailing list