Details
-
Bug
-
Resolution: Unresolved
-
High
-
None
-
5.4.1.1
Description
According to the documentation and especially the Language Switcher, we're supposed to be able to do :
{{ url( location, {"siteaccess": ezpublish.translationSiteAccess( lang ) } ) }}
But there is "maybe" an issue when you are in and Match/URI if you don't set something for the default siteaccess.
Example:
siteaccess: default_siteaccess: site list: - site - site_fr - site_de - administrer match: Map\URI: fr: site_fr de: site_de administrer: administrer manage: administrer
In this case I want the "/" without any URIElement to be the siteaccess "site"
But it doesn't work because the kernel doesn't find the matcher for the default siteaccess, I have the notice because we enter here :
https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/MVC/Symfony/SiteAccess/Router.php#L241
I figured out a workaround :
match: Map\URI: fr: site_fr de: site_de administrer: administrer manage: administrer Map\Host: myhostname.com: site
I'm not sure, how to fix this case.
Probably here : https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Bundle/EzPublishCoreBundle/DependencyInjection/EzPublishCoreExtension.php#L88
I'm not event sure if that is an issue, but it was completely possible in eZ 4, maybe a tip in the documentation could be enough.
Otherwise, I did a PR with another workaround. I'll put it in comment.
Thank you