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

REST v2 "Update location" request is not working as intended

    XMLWordPrintable

Details

    • Aconcagua Sprint 1

    Description

      Making the request with following parameteres:

      Url: /api/ezp/v2/content/locations/1/2/118/132
      Method: "PATCH"
      Body:"{"LocationUpdate":{"sortField":"PATH","sortOrder":"ASC"}}"

      I'm receiving following Error Message:

      {"_media-type":"application/vnd.ez.api.ErrorMessage+json","errorCode":500,
      "errorMessage":"Internal Server Error",
      "errorDescription":"Catchable Fatal Error: Argument 1 passed to eZ\\Publish\\Core\\Repository\\LocationService::buildDomainLocationObject() must be an instance of eZ\\Publish\\SPI\\Persistence\\Content\\Location, null given, called in E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\Repository\\LocationService.php on line 192 and defined in E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\Repository\\LocationService.php line 875","trace":"#0 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\Repository\\LocationService.php(875): Symfony\\Component\\HttpKernel\\Debug\\ErrorHandler->handle(4096, 'Argument 1 pass...', 'E:\\_EZ\\GitHub\\e...', 875, Array)\n#1 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\Repository\\LocationService.php(192): eZ\\Publish\\Core\\Repository\\LocationService->buildDomainLocationObject(NULL)\n#2 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\Repository\\LocationService.php(587): eZ\\Publish\\Core\\Repository\\LocationService->loadLocation(132)\n#3 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\SignalSlot\\LocationService.php(204): eZ\\Publish\\Core\\Repository\\LocationService->updateLocation(Object(eZ\\Publish\\Core\\Repository\\Values\\Content\\Location), Object(eZ\\Publish\\API\\Repository\\Values\\Content\\LocationUpdateStruct))\n#4 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\REST\\Server\\Controller\\Location.php(374): eZ\\Publish\\Core\\SignalSlot\\LocationService->updateLocation(Object(eZ\\Publish\\Core\\Repository\\Values\\Content\\Location), Object(eZ\\Publish\\API\\Repository\\Values\\Content\\LocationUpdateStruct))\n#5 [internal function]: eZ\\Publish\\Core\\REST\\Server\\Controller\\Location->updateLocation()\n#6 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\HttpKernel.php(129): call_user_func_array(Array, Array)\n#7 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#8 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#9 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#10 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\web\\index.php(59): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#11 E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\web\\index_dev.php(3): require('E:\\_EZ\\GitHub\\e...')\n#12 {main}",
      "file":"E:\\_EZ\\GitHub\\ezpublish-new\\ezpublish-community\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\Repository\\LocationService.php",
      "line":875}
      

      The same request was working on the version of REST interface checked out somewhere lately after the beginning of 2013.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Anton.Petrushenkov-obsolete@ez.no Anton Petrushenkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 50 minutes
                4h 50m