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

URIElement Default SiteAccess No VersatileMatcher found

    Details

    • Type: Bug Bug
    • Status: Backlog
    • Priority: High High
    • Resolution: Unresolved
    • Affects Version/s: 5.4.1.1
    • Fix Version/s: None
    • Component/s: Language

      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

        Activity

        Hide
        Sébastien Morel added a comment -
        Show
        Sébastien Morel added a comment - Here is the PR : https://github.com/ezsystems/ezpublish-kernel/pull/1190

          People

          • Assignee:
            Unassigned
            Reporter:
            Sébastien Morel
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: