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

delete location doesn't fully expire stash cache

    XMLWordPrintable

Details

    Description

      LocationService->loadLocationChildren throws an exception, sometimes, when I attempt to load children from a location where content has been deleted and re-inserted.

      steps to reproduce:
      • Import the code below as a new command to execute later
      • Create 3 folders at the root node: folder A, folder B, folder C
      • Add a secondary location of folder C inside folder A
      • Add a secondary location of folder B inside folder A
      • execute the command => output 2
      • Delete the secondary location of folder B that is in folder A
      • execute the command => output 1
      • Add a secondary location of folder B inside folder A
      • execute the command => failure
        => Expected result: 2 nodes should be counted
        => Actual result: Raised exception: Could not find 'location' with identifier '142'
        $userId = 10;
        $nodeId = <folderA-nodeId>;
        $repository = $this->getContainer()->get( 'ezpublish.api.repository' );
        $repository->setCurrentUser( $repository->getUserService()->loadUser( $userId) );
        $locationService = $repository->getLocationService();
        $rootLocation = $locationService->loadLocation( $nodeId ); 
      
        $allItems = $locationService->loadLocationChildren( $rootLocation );
        $output->writeln( "loadLocationChildren" );
      //  $output->writeln( print_r( $allItems, true ) );
        $output->writeln( count( $allItems );
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            joaquim.cavalleri-obsolete@ez.no Joaquim Cavalleri (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 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, 4 hours
                1d 4h