Details

      Description

      Creating a view is returning 500 error
      Steps to Reproduce

      1. Login to admin interface as admin
      2. Open content struture
      3. Create a new Folder name "News"
      4. Inside News create a an article with name "Article 1" and summary "Summary 1"
      5. Using the REST client create the following request:
        POST: http://ezp5.jp.cleverti.qa.ezpublish.no/api/ezp/v2/content/views
        Accept: application/vnd.ez.api.View+json
        Content-Type: application/vnd.ez.api.ViewInput+json
        Body: {"ViewInput":{"identifier":"some-test-id-1","public":false,"Query":{"Criteria": {"FullTextCriterion":"Article"}

        ,"offset":0,"FacetBuilders":{},"SortClauses":{},"spellcheck":false}}}

      6. Submit

      I get the following error:

      {"ErrorMessage":{"_media-type":"application\/vnd.ez.api.ErrorMessage+json","errorCode":500,"errorMessage":"Internal Server Error","errorDescription":"None of the chained routers were able to generate route: Route 'ezpublish_rest_loadView' not found","trace":"#0 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Server\/Output\/ValueObjectVisitor\/RestExecutedView.php(76): Symfony\\Cmf\\Component\\Routing\\ChainRouter->generate('ezpublish_rest_...', Array)\n#1 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Common\/Output\/ValueObjectVisitorDispatcher.php(73): eZ\\Publish\\Core\\REST\\Server\\Output\\ValueObjectVisitor\\RestExecutedView->visit(Object(eZ\\Publish\\Core\\REST\\Common\\Output\\Visitor), Object(eZ\\Publish\\Core\\REST\\Common\\Output\\Generator\\Json), Object(eZ\\Publish\\Core\\REST\\Server\\Values\\RestExecutedView))\n#2 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Common\/Output\/Visitor.php(142): eZ\\Publish\\Core\\REST\\Common\\Output\\ValueObjectVisitorDispatcher->visit(Object(eZ\\Publish\\Core\\REST\\Server\\Values\\RestExecutedView))\n#3 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Common\/Output\/Visitor.php(104): eZ\\Publish\\Core\\REST\\Common\\Output\\Visitor->visitValueObject(Object(eZ\\Publish\\Core\\REST\\Server\\Values\\RestExecutedView))\n#4 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Server\/View\/AcceptHeaderVisitorDispatcher.php(60): eZ\\Publish\\Core\\REST\\Common\\Output\\Visitor->visit(Object(eZ\\Publish\\Core\\REST\\Server\\Values\\RestExecutedView))\n#5 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Bundle\/EzPublishRestBundle\/EventListener\/ResponseListener.php(60): eZ\\Publish\\Core\\REST\\Server\\View\\AcceptHeaderVisitorDispatcher->dispatch(Object(Symfony\\Component\\HttpFoundation\\Request), Object(eZ\\Publish\\Core\\REST\\Server\\Values\\RestExecutedView))\n#6 [internal function]: eZ\\Bundle\\EzPublishRestBundle\\EventListener\\ResponseListener->onKernelResultView(Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#7 \/var\/www\/html\/ezpublish5\/ezpublish\/cache\/prod\/classes.php(1796): call_user_func(Array, Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#8 \/var\/www\/html\/ezpublish5\/ezpublish\/cache\/prod\/classes.php(1729): Symfony\\Component\\EventDispatcher\\EventDispatcher->doDispatch(Array, 'kernel.view', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#9 \/var\/www\/html\/ezpublish5\/ezpublish\/cache\/prod\/classes.php(1893): Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch('kernel.view', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#10 \/var\/www\/html\/ezpublish5\/ezpublish\/bootstrap.php.cache(2844): Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#11 \/var\/www\/html\/ezpublish5\/ezpublish\/bootstrap.php.cache(2815): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#12 \/var\/www\/html\/ezpublish5\/ezpublish\/bootstrap.php.cache(2944): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#13 \/var\/www\/html\/ezpublish5\/ezpublish\/bootstrap.php.cache(2245): Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#14 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Bundle\/EzPublishCoreBundle\/Kernel.php(67): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#15 \/var\/www\/html\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpCache\/HttpCache.php(472): eZ\\Bundle\\EzPublishCoreBundle\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#16 \/var\/www\/html\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Bundle\/FrameworkBundle\/HttpCache\/HttpCache.php(60): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->forward(Object(Symfony\\Component\\HttpFoundation\\Request), true, NULL)\n#17 \/var\/www\/html\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpCache\/HttpCache.php(243): Symfony\\Bundle\\FrameworkBundle\\HttpCache\\HttpCache->forward(Object(Symfony\\Component\\HttpFoundation\\Request), true)\n#18 \/var\/www\/html\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpCache\/HttpCache.php(260): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->pass(Object(Symfony\\Component\\HttpFoundation\\Request), true)\n#19 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Bundle\/EzPublishCoreBundle\/HttpCache.php(57): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->invalidate(Object(Symfony\\Component\\HttpFoundation\\Request), true)\n#20 \/var\/www\/html\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpCache\/HttpCache.php(189): eZ\\Bundle\\EzPublishCoreBundle\\HttpCache->invalidate(Object(Symfony\\Component\\HttpFoundation\\Request), true)\n#21 \/var\/www\/html\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Bundle\/EzPublishCoreBundle\/HttpCache.php(36): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#22 \/var\/www\/html\/ezpublish5\/web\/index.php(64): eZ\\Bundle\\EzPublishCoreBundle\\HttpCache->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#23 {main}","file":"\/var\/www\/html\/ezpublish5\/vendor\/symfony-cmf\/routing\/Symfony\/Cmf\/Component\/Routing\/ChainRouter.php","line":246}}
      

        Issue Links

          Activity

          Hide
          Borreli Pascal added a comment -

          having same issue

          [2014-05-08 17:23:49] app.INFO: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ezpublish_rest_loadView' not found': Unable to generate a URL for the named route "ezpublish_rest_loadView" as such route does not exist. [] []
          [2014-05-08 17:23:49] app.INFO: Router eZBundleEzPublishLegacyBundleRoutingFallbackRouter_0000000050044d5500007f6db8e86224 was unable to generate route. Reason: 'Route 'ezpublish_rest_loadView' not found': [] []

          Show
          Borreli Pascal added a comment - having same issue [2014-05-08 17:23:49] app.INFO: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ezpublish_rest_loadView' not found': Unable to generate a URL for the named route "ezpublish_rest_loadView" as such route does not exist. [] [] [2014-05-08 17:23:49] app.INFO: Router eZBundleEzPublishLegacyBundleRoutingFallbackRouter_0000000050044d5500007f6db8e86224 was unable to generate route. Reason: 'Route 'ezpublish_rest_loadView' not found': [] []
          Hide
          Borreli Pascal added a comment - - edited

          https://github.com/ezsystems/ezpublish-kernel/commit/6e2c423ae353080e06461b344905f0dd9b9974a2 added a new ezpublish_rest_getView
          https://github.com/ezsystems/ezpublish-kernel/commit/23c0974a61dad3f39cfc8febbea95cc563b47433 removed the route ezpublish_rest_loadView
          Both look not implemented anyway : https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/REST/Server/Controller/Content.php#L786

          Seems this route is only there to get the content view url, but it makes the whole content/views unusable

          Show
          Borreli Pascal added a comment - - edited https://github.com/ezsystems/ezpublish-kernel/commit/6e2c423ae353080e06461b344905f0dd9b9974a2 added a new ezpublish_rest_getView https://github.com/ezsystems/ezpublish-kernel/commit/23c0974a61dad3f39cfc8febbea95cc563b47433 removed the route ezpublish_rest_loadView Both look not implemented anyway : https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/REST/Server/Controller/Content.php#L786 Seems this route is only there to get the content view url, but it makes the whole content/views unusable
          Hide
          Bertrand Dunogier added a comment -

          Hmmm, as far as I can recall, it's still supposed to be POST. It would just return a 200 OK instead of 201 Created since it doesn't create the actual view. But still POST...

          Show
          Bertrand Dunogier added a comment - Hmmm, as far as I can recall, it's still supposed to be POST. It would just return a 200 OK instead of 201 Created since it doesn't create the actual view. But still POST...
          Hide
          Bertrand Dunogier added a comment - - edited

          Yes, it's probably the route generation. Should be easy to fix then.

          Show
          Bertrand Dunogier added a comment - - edited Yes, it's probably the route generation. Should be easy to fix then.
          Show
          Bertrand Dunogier added a comment - Pull-request: https://github.com/ezsystems/ezpublish-kernel/pull/886 .
          Hide
          Bertrand Dunogier added a comment -
          Show
          Bertrand Dunogier added a comment - Merged to ezsystems/ezpublish-kernel/master@642e7249 .
          Hide
          Paulo Nunes (Inactive) added a comment -

          QA Approved
          (Note: I get the 200 code, but i cannot see the view. So, the POST seems to be made (the scope of this issue), but the view is not created)

          Show
          Paulo Nunes (Inactive) added a comment - QA Approved (Note: I get the 200 code, but i cannot see the view. So, the POST seems to be made (the scope of this issue), but the view is not created)

            People

            • Assignee:
              Unassigned
              Reporter:
              Joao Pingo (Inactive)
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: