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

eZRest v2 : Some (unknown) REST call corrupts the database and make MoveSubtree call fail

    XMLWordPrintable

Details

    Description

      I have a MoveSubtree test which works fine if run stand-alone ( on a fresh db ).
      However, If I run my whole Location test suite, the MoveSubtree test will fail. This means that some of the REST calls make the database inconsistent. The testsuite only create objects and move/remove/alter locations.

      I guess the best way for figure out what is going on is to install a sql dump of the DB, send the moveSubtree request and inspect why it fails ( what in the DB is inconsistent )... Based on that we might be able to figure out what call makes the DB inconsistent ( it seems to be urlAlias related though )...
      Or maybe the DB is not really inconsistent but that there is a condition which moveSubtree do not handle correctly?

      On the attached DB, this is the moveSubtree call that fails ( I am moving "/SubTreeA/Level1" node below "/SubTreeB" )

      #################### - Client request BEGIN - #########################
      MOVE /api/ezp/v2/content/locations/1/2/94/96 HTTP/1.1
      Host: ezpublish5.rhel61.qa.ez.local:8080
      User-Agent: eZ REST QA Tester
      Authorization: Basic YWRtaW46cHVibGlzaA==
      Destination: /content/locations/1/2/95
      
      
      ##################### - Client request END - ##########################
      sending to target...done.
      Received from Target:
      ##################### - Target reply BEGIN - ##########################
      HTTP/1.1 500 Internal Server Error
      Date: Thu, 18 Apr 2013 14:06:39 GMT
      Server: Apache/2.2.15 (Red Hat)
      X-Powered-By: PHP/5.3.3
      Status: 500 Internal Server Error
      Cache-Control: no-cache
      X-Debug-Token: b4fd8bcbc56fac7bb52b5727d07e06beee516f7d
      Connection: close
      Transfer-Encoding: chunked
      Content-Type: application/vnd.ez.api.ErrorMessage+xml
      
      b32
      <?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>Database error</errorDescription>
       <trace>#0 /var/www/apache2php53/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Handler.php(573): eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion-&gt;reparent('44', '53')
      #1 /var/www/apache2php53/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Cache/UrlAliasHandler.php(225): eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler-&gt;locationMoved(96, 94, 95)
      #2 /var/www/apache2php53/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/LocationService.php(773): eZ\Publish\Core\Persistence\Cache\UrlAliasHandler-&gt;locationMoved(96, 94, 95)
      #3 /var/www/apache2php53/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/SignalSlot/LocationService.php(300): eZ\Publish\Core\Repository\LocationService-&gt;moveSubtree(Object(eZ\Publish\Core\Repository\Values\Content\Location), Object(eZ\Publish\Core\Repository\Values\Content\Location))
      #4 /var/www/apache2php53/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/Location.php(222): eZ\Publish\Core\SignalSlot\LocationService-&gt;moveSubtree(Object(eZ\Publish\Core\Repository\Values\Content\Location), Object(eZ\Publish\Core\Repository\Values\Content\Location))
      #5 [internal function]: eZ\Publish\Core\REST\Server\Controller\Location-&gt;moveSubtree()
      #6 /var/www/apache2php53/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(129): call_user_func_array(Array, Array)
      #7 /var/www/apache2php53/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(73): Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
      #8 /var/www/apache2php53/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php(57): Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #9 /var/www/apache2php53/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(197): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #10 /var/www/apache2php53/ezpublish5/web/index_dev.php(14): Symfony\Component\HttpKernel\Kernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request))
      #11 {main}</trace>
       <file>/var/www/apache2php53/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php</file>
       <line>170</line>
      </ErrorMessage>
      
      
      ###################### - Target reply END - ###########################
      

      Attachments

        1. ezp_afteronetest.sql.gz
          38 kB
        2. ezp_beforetest.sql.gz
          37 kB
        3. ezp2.sql.gz
          42 kB
        4. ezp3.sql.gz
          38 kB

        Activity

          People

            Unassigned Unassigned
            vidar.langseid@ibexa.co Vidar Langseid
            Votes:
            0 Vote for this issue
            Watchers:
            4 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 - 1 day, 5 hours
                1d 5h