Open arboc opened 3 years ago
@Defcon0 Do you have an idea here?
I think, it is somewhere here:
line 106 in HeimrichHannot\CategoriesBundle\Module\ModuleCategoriesMenu
// Get the parent categories IDs
foreach ($categories as $category) {
if ($this->cm_customCategories) {
$arrIds[] = $category->id;
} else {
$arrIds = array_merge($arrIds, $categoriesManager->findBy('pid', $category->pid)->fetchEach('id'));
}
}
The problem is, the pid
of a category entity wich belongs to a language refers to the entity of the default language and not the hierachical parent.
So the $arrIds
will be wrong.
something like this might help:
if (isset($category->language ) && ('' != $category->language ) {
$category = CategoryModel::findById($category->pid);
}
Could you write a PR for that one?
my idea does not work...
Context Contao version: 4.9.12
Bundle version: 1.1.1 PHP version: 7.4
Description This is an issue in combination with the heimrichhannot/contao-categories-multilingual-bundle version 0.0.4 and refers to the frontend module: filter menu.
With the default language, every things works. But with a second language I have the following problems:
The filter menu shows only the categories in 1st level, not the subcategories.