Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2014.07, 5.3.3
-
None
Description
Hi,
I insert language switcher in my page_header.html.twig as described in the documentation https://doc.ez.no/display/EZP/Language+Switcher
and defined my pagelayout.html.twig to display legacy modules (content/search for example).
But it raise an error when displaying the page content/search :
An exception has been thrown during the rendering of a template ("When generating an eZ Publish legacy fallback route, "uri" parameter must be provided.") in EzConsultingBundle:Language:switcher.html.twig at line 17.
And this is my template twig :
<div id="lang-selector"> {% for lang in ezpublish.availableLanguages %} {# This time, we alter the "siteaccess" parameter directly. #} {# We get the right siteaccess with the help of ezpublish.translationSiteAccess() helper #} {% do routeRef.set( "siteaccess", ezpublish.translationSiteAccess( lang ) ) %} {% if lang != currentLanguage %} <a href="{{ url( routeRef ) }}" title="Switch to {{ siteaccess[lang] }}"> <img src="{{ asset( '/share/icons/flags/' ~ lang ~ '.gif' ) }}" title="{{ lang }}"> {{ siteaccess[lang]}} </a> {% endif %} {% endfor %} </div>
It seems that in the variable routeRef sent to the template, "route" is set to "ez_legacy" and there is not any "params.parameters".