Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-1003

Wrong Urls used for siteaccesses with defined root_location in ez studio's "view" mode

    XMLWordPrintable

    Details

      Description

      We have a multisite setup like the following:

          siteaccess:
              list:
                  - site_xyz
                  - site_abc
              groups:
                  site_xyz_group:
                      - site_xyz
                  site_abc_group:
                      - site_abc
              default_siteaccess: site_xyz
              match:
                  Map\Host:
                      xyz.docker: site_xyz
                      abc.docker: site_abc
                      
          system:
              site_xyz_group:
                  var_dir: var/site
                  content:
                      tree_root:
                          location_id: 54
              site_abc_group:
                  var_dir: var/site
                  content:
                      tree_root:
                          location_id: 54               
      

      When trying to view some content, let's assume as an example a folder with it's relative path to it's site's root "/folder", this content is accessible via "http://xyz.docker/folder". But in admin, if we want to see it in studio's "view" mode, we get an error saying `No route found for "GET /site_xyz/folder" (from "http://xyz.docker/ez")`.

      So for some reason, URLs get prefixed with the sitaccess's name, in this example "/site_xyz" which of course leads to an URL that does not exist.

      Hint: The preview in ezplatform's edit view works though. This is why we expect this to be a bug rather than misconfiguration.

      Note (eZ Support): multisite configuration is not required to reproduce this. All that is required is this:

      ezpublish:
          siteaccess:
              ...
              match:
      #            URIElement: 1
                  Map\Host:
                      example.com: site
      

      Stack Trace:

      [1] Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /site/" (from "http://ezstudio140.com/ez")
          at n/a
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176
      
          at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))
              in  line 
      
          at call_user_func(array(object(RouterListener), 'onKernelRequest'), object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php line 61
      
          at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher))
              in  line 
      
          at call_user_func(object(WrappedListener), object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher))
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php line 184
      
          at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(GetResponseEvent))
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php line 46
      
          at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.request', object(GetResponseEvent))
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php line 140
      
          at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent))
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 125
      
          at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 64
      
          at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php line 69
      
          at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php line 185
      
          at Symfony\Component\HttpKernel\Kernel->handle(object(Request), '1', true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php line 491
      
          at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(object(Request), true, null)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php line 60
      
          at Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward(object(Request), true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php line 448
      
          at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch(object(Request), true)
              in /var/www/ezstudio140.com/vendor/friendsofsymfony/http-cache-bundle/SymfonyCache/EventDispatchingHttpCache.php line 143
      
          at FOS\HttpCacheBundle\SymfonyCache\EventDispatchingHttpCache->fetch(object(Request), true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php line 344
      
          at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup(object(Request), true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php line 210
      
          at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(object(Request), '1', true)
              in /var/www/ezstudio140.com/vendor/friendsofsymfony/http-cache-bundle/SymfonyCache/EventDispatchingHttpCache.php line 122
      
          at FOS\HttpCacheBundle\SymfonyCache\EventDispatchingHttpCache->handle(object(Request))
              in /var/www/ezstudio140.com/web/app.php line 66
      
      [2] Symfony\Component\Routing\Exception\ResourceNotFoundException: None of the routers in the chain matched this request
      GET /site/ HTTP/1.1
      Accept:                    text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
      Accept-Encoding:           gzip, deflate, sdch
      Accept-Language:           en-US,en;q=0.8
      Authorization:             
      Connection:                keep-alive
      Cookie:                    eZSESSID98defd6ee70dfb1dea416cecdf391f58=ln710b6r89s97nod3kjjf16qm3
      Host:                      ezstudio140.com
      Referer:                   http://ezstudio140.com/ez
      Surrogate-Capability:      symfony2="ESI/1.0"
      Upgrade-Insecure-Requests: 1
      User-Agent:                Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
      X-Forwarded-For:           127.0.0.1
      X-Php-Ob-Level:            1
      X-User-Hash:               5945886524019aefc21a0e99486455ed340b913f23d342bdc6d7459b1a67eeef
      
      
          at n/a
              in /var/www/ezstudio140.com/vendor/symfony-cmf/routing/ChainRouter.php line 207
      
          at Symfony\Cmf\Component\Routing\ChainRouter->doMatch('/site/', object(Request))
              in /var/www/ezstudio140.com/vendor/symfony-cmf/routing/ChainRouter.php line 156
      
          at Symfony\Cmf\Component\Routing\ChainRouter->matchRequest(object(Request))
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 154
      
          at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))
              in  line 
      
          at call_user_func(array(object(RouterListener), 'onKernelRequest'), object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php line 61
      
          at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher))
              in  line 
      
          at call_user_func(object(WrappedListener), object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher))
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php line 184
      
          at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(GetResponseEvent))
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php line 46
      
          at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.request', object(GetResponseEvent))
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php line 140
      
          at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent))
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 125
      
          at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 64
      
          at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php line 69
      
          at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php line 185
      
          at Symfony\Component\HttpKernel\Kernel->handle(object(Request), '1', true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php line 491
      
          at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(object(Request), true, null)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php line 60
      
          at Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward(object(Request), true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php line 448
      
          at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch(object(Request), true)
              in /var/www/ezstudio140.com/vendor/friendsofsymfony/http-cache-bundle/SymfonyCache/EventDispatchingHttpCache.php line 143
      
          at FOS\HttpCacheBundle\SymfonyCache\EventDispatchingHttpCache->fetch(object(Request), true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php line 344
      
          at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup(object(Request), true)
              in /var/www/ezstudio140.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php line 210
      
          at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(object(Request), '1', true)
              in /var/www/ezstudio140.com/vendor/friendsofsymfony/http-cache-bundle/SymfonyCache/EventDispatchingHttpCache.php line 122
      
          at FOS\HttpCacheBundle\SymfonyCache\EventDispatchingHttpCache->handle(object(Request))
              in /var/www/ezstudio140.com/web/app.php line 66
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andesk Andreas Kleemann
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: