Create some categories. In com_finder create filter with these categories. Search for these categories with applied filter (search menu item with this filter or &f={x} in search url).
Categories should be displayed in result list with or without filtering.
Categories are found only when results are not filtered. When filtering is applied, categories are not displayed in result list.
Joomla 4.4.3. Same in 5.0.3.
The problem is that the category is only assigned to type and language finder taxonomies BUT NOT to category taxonomy so it is not found when filtering by this category.
Possible solution: add category taxomony in categories finder plugin.
For my test I copied code from content finder plugin to caegories finder plugin with minor changes and it works as expected now.
Copied code:
// Add the category taxonomy data.
$categories = $this->getApplication()->bootComponent('com_content')->getCategory(['published' => false, 'access' => false]);
$category = $categories->get($item->id);
// Category does not exist, stop here
if (!$category) {
return;
}
$item->addNestedTaxonomy('Category', $category, $this->translateState($category->published), $category->access, $category->language);
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
You are right, we would need a nested taxonomy entry for the categories. Would you be willing to make a pull request with the necessary changes? Please add it with an option as we have for other taxonomies, defaulting to off for now. ?