Skip to content

Clicking on a taxonomy count from the Taxonomies tab does not filter the contents overview #714

@Balastrong

Description

@Balastrong

Describe the bug
When you click on a taxonomy count and get redirected to the overview there is no tag filter - all items are displayed

image

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Taxonomies tab
  2. Click on a number

Expected behavior
I was expecting the articles to be filtered by the taxonomy I just clicked on the previous screen.

Additional context
I had a look at the code and I noticed when clicking on that number, this should happen:

if (total) {
navigate(`${routePaths.contents}?taxonomy=${taxonomy}&value=${value}`);
}

The atom is set and so is the filter.

if (taxonomy === 'tags') {
setCrntTag(value);

However, before the user can see the result, this happens:

useEffect(() => {
if (view && routePaths[view]) {
navigate(routePaths[view]);
return;
}
navigate(routePaths[view]);
}, [view]);

On line 60 the path is set to /contents and the filter is gone. As a result, all items are displayed.

By commenting line 60 the navigation+filter works fine, but I don't know why that logic is there and if it can be removed

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions