'Route 'The route object is fit for parsing to generate() method' not found': Document is not correct or route cannot be generated.
Mantas Marcinkevičius
@einorler
i would suggest simply using a link to a product with a correct id of a variant in the requst query and let the twig handle the correct variant to display
Jan
@funkdoobiest
we need real urls for SEO
Mantas Marcinkevičius
@einorler
that way you wouldnt need to use the trait in the variant at all
it is a real url to a product
Jan
@funkdoobiest
yes, but not the same as before
and I need this specific urls for seo
Mantas Marcinkevičius
@einorler
difficult to say whats wrong in your situation, but it may be that if you insist on having the urls generated for variants and the problem is deeper, it may be that you will need to create a custom router
the shrot description on how to do it is in the docs right now, a lot more in depth one will be accessible in the docs shortly
you coud try to debug the generate method in ONGR\RouterBundle\Routing to see whats going wrong
Mantas Marcinkevičius
@einorler
i ment ONGR\RouterBundle\Routing\DocumentUrlGenerator :)
Mantas Marcinkevičius
@einorler
I've just taken a quick look at the ONGR url generator
you should check if its so, but it seems, that it will not return a correct type because the variant is not a ES document, but a nested object