Details
-
Bug
-
Resolution: Fixed
-
High
-
None
-
5.2-dev
-
Aconcagua Sprint 1
Description
Making the request with following parameteres:
Url: /api/ezp/v2/content/views
Method: "POST"
Body: "{"ViewInput":{"identifier":"some-test-id","public":false,"Query":{"Criteria":
,"offset":0,"FacetBuilders":{},"SortClauses":{},"spellcheck":false}}}"
I'm receiving following Error Message:
{"ErrorMessage":{"media-type":"application\/vnd.ez.api.ErrorMessage+json","errorCode":500,"errorMessage":"Internal Server Error","errorDescription":"Catchable Fatal Error: Argument 4 passed to eZ\\Publish\\Core\\REST\\Server\\Values
RestContent::construct() must be an instance of eZ\\Publish\\API\\Repository\\Values\\ContentType
ContentType, array given, called in E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\REST\\Server\\Output\\ValueObjectVisitor
RestExecutedView.php on line 97 and defined in E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\REST\\Server\\Values
RestContent.php line 71","trace":"#0 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\REST\\Server\\Values
RestContent.php(71): Symfony\\Component\\HttpKernel\\Debug
ErrorHandler->handle(4096, 'Argument 4 pass...', 'E:\\_EZ\\GitHub
e...', 71, Array)\n#1 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\REST\\Server\\Output\\ValueObjectVisitor
RestExecutedView.php(97): eZ\\Publish\\Core\\REST\\Server\\Values\\RestContent->_construct(Object(eZ\\Publish\\API\\Repository\\Values\\Content
ContentInfo), Object(eZ\\Publish\\Core\\Repository\\Values\\Content
Location), Object(eZ\\Publish\\Core\\Repository\\Values\\Content
Content), Array)\n#2 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\REST\\Common\\Output
Visitor.php(246): 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#3 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\REST\\Common\\Output
Visitor.php(189): eZ\\Publish\\Core\\REST\\Common\\Output\\Visitor->visitValueObject(Object(eZ\\Publish\\Core\\REST\\Server\\Values\\RestExecutedView))\n#4 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\REST\\Server\\View
AcceptHeaderVisitorDispatcher.php(70): eZ\\Publish\\Core\\REST\\Common\\Output\\Visitor->visit(Object(eZ\\Publish\\Core\\REST\\Server\\Values\\RestExecutedView))\n#5 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Bundle\\EzPublishRestBundle\\EventListener
RestListener.php(192): eZ\\Publish\\Core\\REST\\Server\\View\\AcceptHeaderVisitorDispatcher->dispatch(Object(eZ\\Publish\\Core\\REST\\Server
Request), Object(eZ\\Publish\\Core\\REST\\Server\\Values\\RestExecutedView))\n#6 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Bundle\\EzPublishRestBundle\\EventListener
RestListener.php(94): eZ\\Bundle\\EzPublishRestBundle\\EventListener\\RestListener->visitResult(Object(eZ\\Publish\\Core\\REST\\Server\\Values\\RestExecutedView))\n#7 [internal function]: eZ\\Bundle\\EzPublishRestBundle\\EventListener\\RestListener->onKernelResultView(Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#8 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Debug
TraceableEventDispatcher.php(451): call_user_func(Array, Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#9 [internal function]: Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher->Symfony\\Component\\HttpKernel\\Debug
(Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#10 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\ezpublish\\cache\\dev
classes.php(3417): call_user_func(Object(Closure), Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#11 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\ezpublish\\cache\\dev
classes.php(3350): Symfony\\Component\\EventDispatcher
EventDispatcher->doDispatch(Array, 'kernel.view', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#12 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\ezpublish\\cache\\dev
classes.php(3514): Symfony\\Component\\EventDispatcher
EventDispatcher->dispatch('kernel.view', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#13 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Debug
TraceableEventDispatcher.php(139): Symfony\\Component\\EventDispatcher
ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#14 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel
HttpKernel.php(134): Symfony\\Component\\HttpKernel\\Debug
TraceableEventDispatcher->dispatch('kernel.view', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#15 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel
HttpKernel.php(73): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation
Request), 1)\n#16 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\DependencyInjection
ContainerAwareHttpKernel.php(57): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation
Request), 1, true)\n#17 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel
Kernel.php(197): Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation
Request), 1, true)\n#18 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\web
index.php(59): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#19 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\web
index_dev.php(3): require('E:\\_EZ\\GitHub\\e...')\n#20
","file":"E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\REST\\Server\\Values
RestContent.php","line":71}}
The same request was working on the version of REST interface checked out somewhere lately after the beginning of 2013.