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

URIElement Default SiteAccess No VersatileMatcher found

    XMLWordPrintable

Details

    Description

      According to the documentation and especially the Language Switcher, we're supposed to be able to do :

      Unable to find source-code formatter for language: twig. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      {{ 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            plopix plopix
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: