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

JavaScript error when opening the content tree after removing a folder

    XMLWordPrintable

Details

    Description

      As the title says, when i remove an object (a folder, for instance) and then open the content tree, an error is raised and the Content Tree is empty.

      Steps to Reproduce (in prod environement)
      • Create a folder
      • Open the content tree and see that the folder is present (this action is essential for the issue to occur)
      • Remove the created folder
      • Open the content tree again - the tree appears empty

      in firebug, i have the following error:

      	
      404 Not Found
      		414ms	
      CAPI.js (line 1406)
      HeadersResponseJSONCookies
      
      {"ErrorMessage":{"_media-type":"application\/vnd.ez.api.ErrorMessage+json","errorCode":404,"errorMessage"
      :"Not Found","errorDescription":"Could not find 'location' with identifier '64'","trace":"#0 \/var\/www
      \/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Persistence\/Legacy\/Content\/Location
      \/Gateway\/ExceptionConversion.php(59): eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway
      \\DoctrineDatabase->getBasicNodeData('64')\n#1 \/var\/www\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel
      \/eZ\/Publish\/Core\/Persistence\/Legacy\/Content\/TreeHandler.php(156): eZ\\Publish\\Core\\Persistence
      \\Legacy\\Content\\Location\\Gateway\\ExceptionConversion->getBasicNodeData('64')\n#2 \/var\/www\/ezpublish5
      \/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Persistence\/Legacy\/Content\/Location\/Handler
      .php(111): eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\TreeHandler->loadLocation('64')\n#3 \/var
      \/www\/ezpublish5\/ezpublish\/cache\/prod\/ezpublishProdProjectContainer.php(26248): eZ\\Publish\\Core
      \\Persistence\\Legacy\\Content\\Location\\Handler->load('64')\n#4 \/var\/www\/ezpublish5\/vendor\/ezsystems
      \/ezpublish-kernel\/eZ\/Publish\/Core\/Persistence\/Cache\/LocationHandler.php(32): eZPublishCorePer
      sistenceLegacyContentLocationHandler_0000000015b4a757000000007e4f8263de782a6991dbe2c0bb10911267c3f4a1-
      >load('64')\n#5 \/var\/www\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Repository
      \/LocationService.php(201): eZ\\Publish\\Core\\Persistence\\Cache\\LocationHandler->load('64')\n#6 \
      /var\/www\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/SignalSlot\/LocationService
      .php(103): eZ\\Publish\\Core\\Repository\\LocationService->loadLocation('64')\n#7 \/var\/www\/ezpublish5
      \/ezpublish\/cache\/prod\/ezpublishProdProjectContainer.php(25253): eZ\\Publish\\Core\\SignalSlot\\LocationService-
      >loadLocation('64')\n#8 \/var\/www\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core
      \/REST\/Server\/Controller\/Location.php(134): eZPublishCoreRepositoryLocationService_0000000015b4a461000000007e4f8263de782a6991dbe2c0bb10911267c3f4a1-
      >loadLocation('64')\n#9 [internal function]: eZ\\Publish\\Core\\REST\\Server\\Controller\\Location->loadLocation
      ('1\/2\/64')\n#10 \/var\/www\/ezpublish5\/ezpublish\/bootstrap.php.cache(3109): call_user_func_array
      (Array, Array)\n#11 \/var\/www\/ezpublish5\/ezpublish\/bootstrap.php.cache(3071): Symfony\\Component
      \\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#12 \/var
      \/www\/ezpublish5\/ezpublish\/bootstrap.php.cache(3222): Symfony\\Component\\HttpKernel\\HttpKernel-
      >handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#13 \/var\/www\/ezpublish5\/ezpublish
      \/bootstrap.php.cache(2444): Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel-
      >handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#14 \/var\/www\/ezpublish5\/vendor
      \/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpCache\/HttpCache.php(492): Symfony\\Component
      \\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#15 \/var
      \/www\/ezpublish5\/vendor\/symfony\/symfony\/src\/Symfony\/Bundle\/FrameworkBundle\/HttpCache\/HttpCache
      .php(60): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->forward(Object(Symfony\\Component\\HttpFoundation
      \\Request), true, Object(Symfony\\Component\\HttpFoundation\\Response))\n#16 \/var\/www\/ezpublish5\
      /vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpCache\/HttpCache.php(396): Symfony
      \\Bundle\\FrameworkBundle\\HttpCache\\HttpCache->forward(Object(Symfony\\Component\\HttpFoundation\\Request
      ), true, Object(Symfony\\Component\\HttpFoundation\\Response))\n#17 \/var\/www\/ezpublish5\/vendor\/symfony
      \/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpCache\/HttpCache.php(355): Symfony\\Component\\HttpKernel
      \\HttpCache\\HttpCache->validate(Object(Symfony\\Component\\HttpFoundation\\Request), Object(Symfony
      \\Component\\HttpFoundation\\Response), true)\n#18 \/var\/www\/ezpublish5\/vendor\/symfony\/symfony\
      /src\/Symfony\/Component\/HttpKernel\/HttpCache\/HttpCache.php(213): Symfony\\Component\\HttpKernel\
      \HttpCache\\HttpCache->lookup(Object(Symfony\\Component\\HttpFoundation\\Request), true)\n#19 \/var\
      /www\/ezpublish5\/vendor\/friendsofsymfony\/http-cache-bundle\/SymfonyCache\/EventDispatchingHttpCache
      .php(122): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->handle(Object(Symfony\\Component\\HttpFoundation
      \\Request), 1, true)\n#20 \/var\/www\/ezpublish5\/web\/index.php(66): FOS\\HttpCacheBundle\\SymfonyCache
      \\EventDispatchingHttpCache->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#21 {main}"
      ,"file":"\/var\/www\/ezpublish5\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/Persistence
      \/Legacy\/Content\/Location\/Gateway\/DoctrineDatabase.php","line":86}}
      
      "NetworkError: 404 Not Found - http://ezp5.paulo/api/ezp/v2/content/locations/1/2/64"
      64
      GET http://ezp5.pauloundefined/
      	
      		0ms	
      CAPI.js (line 1406)
      GET http://ezp5.pauloundefined/
      	
      		2ms	
      CAPI.js (line 1406)
      2
      Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://ezp5.pauloundefined/. (Reason: CORS request failed).
      

      Could only make the error appear on "prod" environment. The issue do not occur when in "dev" environment.

      Attachments

        Activity

          People

            Unassigned Unassigned
            paulo.nunes-obsolete@ez.no Paulo Nunes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour
                1d 1h