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

error 500 on /api/ezp/v2/content/locations/1

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 5.3
    • 5.3-dev
    • Platform > REST API v2
    • Ventoux Sprint 6

    Description

      curl/api/ezp/v2/content/locations/1 is referenced by root location resource but using it generates a 500 error.

      curl -u admin:ezpublish -i -H local'Accept: application/vnd.ez.api.Location+xml' 'http://ezpublish5.loc/api/ezp/v2/content/locations/1'
      
      HTTP/1.1 500 Internal Server Error
      Date: Mon, 09 Dec 2013 08:00:35 GMT
      Server: Apache/2.2.22 (Ubuntu)
      X-Powered-By: PHP/5.4.9-4ubuntu2.3
      Accept-Patch: application/vnd.ez.api.LocationUpdate+xml
      Status: 500 Internal Server Error
      Cache-Control: no-cache
      X-Debug-Token: a3dbc8
      Connection: close
      Transfer-Encoding: chunked
      Content-Type: application/vnd.ez.api.Location+xml
      
      <?xml version="1.0" encoding="UTF-8"?>
      <ErrorMessage media-type="application/vnd.ez.api.ErrorMessage+xml">
       <errorCode>500</errorCode>
       <errorMessage>Internal Server Error</errorMessage>
       <errorDescription>Parameter &quot;locationPath&quot; for route &quot;ezpublish_rest_loadLocation&quot; must match &quot;[0-9/]+&quot; (&quot;&quot; given) to generate a corresponding URL.</errorDescription>
       <trace>#0 /home/dp/dev/ezpublish-community/ezpublish/cache/dev/ezpublishDevUrlGenerator.php(221): Symfony\Component\Routing\Generator\UrlGenerator-&gt;doGenerate(Array, Array, Array, Array, Array, 'ezpublish_rest_...', false, Array)
      #1 /home/dp/dev/ezpublish-community/ezpublish/cache/dev/classes.php(1203): ezpublishDevUrlGenerator-&gt;generate('ezpublish_rest_...', Array, false)
      #2 /home/dp/dev/ezpublish-community/ezpublish/cache/dev/classes.php(1567): Symfony\Component\Routing\Router-&gt;generate('ezpublish_rest_...', Array, false)
      #3 /home/dp/dev/ezpublish-community/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ChainRouter.php(229): eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter-&gt;generate('ezpublish_rest_...', Array, false)
      #4 /home/dp/dev/ezpublish-kernel/eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/RestLocation.php(69): Symfony\Cmf\Component\Routing\ChainRouter-&gt;generate('ezpublish_rest_...', Array)
      #5 /home/dp/dev/ezpublish-kernel/eZ/Publish/Core/REST/Common/Output/ValueObjectVisitorDispatcher.php(73): eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\RestLocation-&gt;visit(Object(eZ\Publish\Core\REST\Common\Output\Visitor), Object(eZ\Publish\Core\REST\Common\Output\Generator\Xml), Object(eZ\Publish\Core\REST\Server\Values\RestLocation))
      #6 /home/dp/dev/ezpublish-kernel/eZ/Publish/Core/REST/Common/Output/Visitor.php(212): eZ\Publish\Core\REST\Common\Output\ValueObjectVisitorDispatcher-&gt;visit(Object(eZ\Publish\Core\REST\Server\Values\RestLocation))
      #7 /home/dp/dev/ezpublish-kernel/eZ/Publish/Core/REST/Common/Output/Visitor.php(164): eZ\Publish\Core\REST\Common\Output\Visitor-&gt;visitValueObject(Object(eZ\Publish\Core\REST\Server\Values\RestLocation))
      #8 /home/dp/dev/ezpublish-kernel/eZ/Publish/Core/REST/Server/View/AcceptHeaderVisitorDispatcher.php(57): eZ\Publish\Core\REST\Common\Output\Visitor-&gt;visit(Object(eZ\Publish\Core\REST\Server\Values\RestLocation))
      #9 /home/dp/dev/ezpublish-kernel/eZ/Bundle/EzPublishRestBundle/EventListener/RestListener.php(183): eZ\Publish\Core\REST\Server\View\AcceptHeaderVisitorDispatcher-&gt;dispatch(Object(Symfony\Component\HttpFoundation\Request), Object(eZ\Publish\Core\REST\Server\Values\RestLocation))
      #10 /home/dp/dev/ezpublish-kernel/eZ/Bundle/EzPublishRestBundle/EventListener/RestListener.php(85): eZ\Bundle\EzPublishRestBundle\EventListener\RestListener-&gt;visitResult(Object(eZ\Publish\Core\REST\Server\Values\RestLocation))
      #11 [internal function]: eZ\Bundle\EzPublishRestBundle\EventListener\RestListener-&gt;onKernelResultView(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))
      #12 /home/dp/dev/ezpublish-community/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php(450): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))
      #13 [internal function]: Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher-&gt;Symfony\Component\HttpKernel\Debug\{closure}(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))
      #14 /home/dp/dev/ezpublish-community/ezpublish/cache/dev/classes.php(1797): call_user_func(Object(Closure), Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))
      #15 /home/dp/dev/ezpublish-community/ezpublish/cache/dev/classes.php(1730): Symfony\Component\EventDispatcher\EventDispatcher-&gt;doDispatch(Array, 'kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))
      #16 /home/dp/dev/ezpublish-community/ezpublish/cache/dev/classes.php(1894): Symfony\Component\EventDispatcher\EventDispatcher-&gt;dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))
      #17 /home/dp/dev/ezpublish-community/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php(139): Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher-&gt;dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))
      #18 /home/dp/dev/ezpublish-community/ezpublish/bootstrap.php.cache(2847): Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher-&gt;dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))
      #19 /home/dp/dev/ezpublish-community/ezpublish/bootstrap.php.cache(2818): Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
      #20 /home/dp/dev/ezpublish-community/ezpublish/bootstrap.php.cache(2947): Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #21 /home/dp/dev/ezpublish-community/ezpublish/bootstrap.php.cache(2249): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #22 /home/dp/dev/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Kernel.php(62): Symfony\Component\HttpKernel\Kernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #23 /home/dp/dev/ezpublish-community/web/index.php(64): eZ\Bundle\EzPublishCoreBundle\Kernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request))
      #24 {main}</trace>
       <file>/home/dp/dev/ezpublish-community/ezpublish/cache/dev/classes.php</file>
       <line>878</line>
      </ErrorMessage>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            damien.pobel-obsolete@ez.no Damien Pobel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 1 hour, 15 minutes Remaining Estimate - 2 hours, 45 minutes
                2h 45m
                Logged:
                Time Spent - 1 hour, 15 minutes Remaining Estimate - 2 hours, 45 minutes
                1h 15m