Oh yes you are right, forgot it. So i will refactor the creation method to create a absolute Route only. And then inject it into a RedirectResponse or into sonatas PageService. 

Mit freundlichen Grüßen

Maximilian Berghoff


---------------------------------------
Maximilian Berghoff
Wiesenstraße 44
91617 Oberdachstetten 

Mail: Maximilian.berghoff@gmx.de
Mobile: +49 151 84625096

> On 14.03.2014, at 18:04, David Buchmann <notifications@github.com> wrote:
> 
> In Model/SeoPresentation.php:
> 
> > +        $routeDocument = null;
> > +        if ($routeStrategy->supports($this->contentDocument)) {
> > +            //than the value is a route document
> > +            $routeDocument = $value;
> > +        }
> > +
> > +        if (is_string($value) && UUIDHelper::isUUID($value)) {
> > +            //the value is the uuid of a route document, one of the documents routes was selected
> > +            $routeDocument = $this->getDocumentManager()->find(null, $value);
> > +        }
> > +
> > +        if (!$routeDocument instanceof Route) {
> > +            throw new SeoAwareException('No redirect route found.');
> > +        }
> > +
> > +        return new RedirectResponse($this->router->generate($routeDocument));
> don't you have the 2 options to have a redirect or to show the canonical url? if you return Response objects, will you not need to duplicate this code for the canonical url? maybe the calling code could create the redirect response object?
> 
> —
> Reply to this email directly or view it on GitHub.