Skip to content

Active categories are not displayed and the number of intersection of two categories is calculated incorrectly in modular type "hierarchical" #268

@grashalm4u

Description

@grashalm4u

I use the news module together with the News Categories (version 4.0.6) on my page (Contao 5.3.11) and now would like to use sub-categories.
I filter my texts primarily on topics (selection of several possible) and on years (only one year possible).
As long as I use the cumulative category filter, the number of texts in different combined categories are displayed correctly in the frontend and the active categories above the toggler are displayed correctly. Of course, no subcategories appear in this module selection.

However, if I use the cumulative hierarchical category of filters as a modular type, all subcategories are displayed. When selecting 2 categories ("Schönes" and "Lustiges"), the corresponding 5 texts are correctly selected as an intersection and correctly displayed in the news list, but the number of intersection is not calculated properly behind the second category, but still displayed the original number (61). In addition, the active categories are not output above the toggler, but remain in the list and are marked in bold.

I noticed that in the following file there is a wrong template assignment in line 30 for my terms. Or is that intended?
/vendor/codefog/contao-news_categories/src/frontendmodule/cumulativehierarchicalfiltermodule.php

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