Details
-
Bug
-
Resolution: Fixed
-
High
-
5.1, 5.2
-
None
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
Issue Links
- testing discovered
-
EZP-21997 Creating custom alias in storage does not fill in $pathData property
- Closed
- links to