Skip to content

Trouble with 1.7.2 and i18n behaviour #1085

@shodanto

Description

@shodanto

Since 1.7.2 i am having trouble with the i18n behaviour. It changed and doesn't deliver the proper language object.
Code:

CategoryQuery::Create()->joinWithI18n(getLocale())->filterByIsMenu(true)->filterByParentId($category->getCategoryId())->useCategoryI18nQuery()->filterByIsactive(true)->enduse()->orderBySort()->find()

Executed query 1.7.1:
SELECT .. FROM categoryLEFT JOINcategory_i18nON (category.categoryId=category_i18n.categoryId AND category_i18n.locale = 'de_DE') WHERE category.isMenu=1 AND category.parentId_second=5 AND category_i18n.isActive=1 ORDER BY category.sort_second ASC;

Executed query 1.7.2:
SELECT ... FROM categoryLEFT JOINcategory_i18nON (category.categoryId=category_i18n.categoryId) WHERE category.isMenu=1 AND category.parentId=10 AND category_i18n.isActive=1 ORDER BY category.sort ASC;

The Problem lies in class Join.php line 580;

 return $join !== null
            && $join instanceof Join
            && $this->getJoinType() == $join->getJoinType()
            && $this->getConditions() == $join->getConditions()
            **&& $this->getClause($parametersOfThisClauses) == $join-> >getClause($parametersOfJoinClauses);** //this line has been added
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions