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

Location not available for /content/search and {{ ezpublish.legacy.get('content_info') }} returns NULL

    XMLWordPrintable

Details

    Description

      If you create a language menu, for instance

      <a href="{{ url( ez_route( params={"language": "eng-GB"} ) ) }}">
             eng-GB
      </a>
      <a href="{{ url( ez_route( params={"language": "nor-NO"} ) ) }}">
             nor-NO
      </a>
      

      when accessing a legacy component( /content/search ) the it will return

      An exception has been thrown during the rendering of a template ("When generating an eZ Publish legacy fallback route, "uri" parameter must be provided.")
      

      This is due to the fact that in legacy_mode there is no Location, in the documentation https://doc.ez.no/display/EZP/Twig+Helper it refers that you can use

      {{ ezpublish.legacy.get('content_info') }} 
      

      however, since /content/search isn't an object, it will always return NULL.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pedro.resende-obsolete@ez.no Pedro Resende (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: