Details
-
Bug
-
Resolution: Unresolved
-
High
-
5.3.3, 5.4-dev
Description
- Create a command and add the following code to the execute method
protected function execute( InputInterface $input, OutputInterface $output ){ $repository = $this->getContainer()->get( 'ezpublish.api.repository' ); $searchService = $repository->getSearchService(); $qrySearch = new Query(); $qrySearch->filter = new Criterion\Subtree( "/1/2/141/" ); $fieldFilters = array( 'languages' => array( 'eng-GB', 'ger-DE'), 'useAlwaysAvailable' => true ); $qryResults = $searchService->findContent( $qrySearch, $fieldFilters); echo( 'Found ' . $qryResults->totalCount . " items with language criterion: \n" ); foreach ( $qryResults->searchHits as $result ) { echo( "#### " . $result->valueObject->contentInfo->name . "\n" ); } }
If under the object with nodeId 141 you create always available objects in languages different from 'eng-GB' or 'ger-DE', you will get an exception.
Attachments
Issue Links
- relates to
-
EZP-22191 As a User I expect API's with language filters to respect Always available flag
- Closed