Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2014.11, 5.3.4, 5.4.1
-
None
-
Pollux Core S3
Description
If you use the api to update a Location and pass a LocationStruct which values are identicals to the Location ones, update process will throw an exception saying your location is not found anymore
Steps to reproduce:
You can try this cli command from one of your bundles (apply your namespace and bundle name accordingly )
class TestCommand extends ContainerAwareCommand { protected function configure() { $this->setName( 'namespace:bundle:test' )->setDefinition(array()); } protected function execute( InputInterface $input, OutputInterface $output ) { $repository = $this->getContainer()->get( 'ezpublish.api.repository' ); $locationService = $repository->getLocationService(); $repository->setCurrentUser( $repository->getUserService()->loadUser( 14 ) ); $rootLocation = $locationService->loadLocation( 2 ); $locationUpdateStruct = $locationService->newLocationUpdateStruct(); $locationUpdateStruct->priority = 100; // first will be ok $output->writeln( 'First attempt should be ok...'); $locationService->updateLocation( $rootLocation, $locationUpdateStruct ); $output->writeln( 'Second attempt will fail...' ); $locationService->updateLocation( $rootLocation, $locationUpdateStruct ); } }
Attachments
Issue Links
- relates to
-
EZP-24698 Role update leads to NotFoundException
-
- Closed
-