Details
-
Bug
-
Resolution: Duplicate
-
High
-
None
-
5.4.0
-
None
-
LAMP
Description
The following code is used to build a menu on a multilanguage site. If 'show_in_menu' is '1' just in one language the menu entry is visible, regardless if the attribute is set in that concrete language. That's not what we intended at all!
$criteria = array(); $criteria[] = new Criterion\Visibility( Criterion\Visibility::VISIBLE ); $criteria[] = new Criterion\ParentLocationId( $location->id ); $criteria[] = new Criterion\ContentTypeIdentifier( array( 'article', 'folder' ) ); $criteria[] = new Criterion\LanguageCode( $languages ); $criteria[] = new Criterion\Field( 'show_in_menu', Criterion\Operator::EQ, 1 ); $query = new LocationQuery( array( 'criterion' => new Criterion\LogicalAnd( $criteria ), 'sortClauses' => array( new SortClause\Location\Priority( LocationQuery::SORT_ASC ) ) ) ); $query->limit = 12; $menuEntryList = $this->buildListFromSearchResult( $this->getRepository()->getSearchService()->findLocations( $query ) );
Do we get a solution for this problem?
Attachments
Issue Links
- duplicates
-
EZP-23524 As a Developer I need support for field filters affecting queries in Legacy Search Engine
- Closed