Details
-
Task
-
Resolution: Duplicate
-
High
-
None
-
3.0.0-beta6
-
None
-
None
Description
When linking to location objects as described in documentation], the system fails.
Linking to location using the object directly in Twig template no longer works:
<a href="{{ path(location) }}">Link with location object</a>
This works ok in eZ Platform v1...2.5 (and v3.0-beta5), but now seems to fail with:
Argument 1 passed to Symfony\Bridge\Twig\Extension\RoutingExtension::getPath() must be of the type string, object given, called in /Users/janit/Sites/web2020/var/cache/dev/twig/68/68d3d9540cbbc6d3414301dfc545d166a531216dd60e7cb1f36c0846adf851b4.php on line 52
Alternative linking method does work as expected:
{{ path( "ez_urlalias", {"locationId": location.id} ) }}
Attachments
Issue Links
- relates to
-
EZP-31499 Provide replacement for generating path/url in twig templates for location/content objects
- Closed