Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-31502

Linking with Twig using location object fails

    XMLWordPrintable

Details

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: High 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

        Activity

          People

            Unassigned Unassigned
            jani.tarvainen@ibexa.co Jani Tarvainen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: