No Code Attached Yet
avatar thanhnv37
thanhnv37
25 May 2024

Steps to reproduce the issue

Create two (or more) taxonomies have node with same title.
For example:
I created two taxonomies that are: Language and Variant.
Both taxonomies have one node with title "notset"

Then I created a filter and select all nodes from these both taxonomies.

Expected result

The search results displays all items by default (since all nodes selected)

Actual result

Display only some items, because the Search modal merge node by their title, so the query not include all ids of selected nodes.

System information (as much as possible)

Additional comments

To resolve this issue, I modified the file below:
components/com_finder/src/Model/SearchModel.php

Replace the code line (line 194):
$taxonomies = \call_user_func_array('array_merge', array_values($this->searchquery->filters));

With below one:

//$taxonomies = \call_user_func_array('array_merge', array_values($this->searchquery->filters));

$taxonomies = [];
for ($i = 0, $c = \count($groups); $i < $c; $i++) {
    $taxonomies = array_merge($taxonomies, array_values($groups[$i]));
}

Please check this issue, and I hope that you can apply this fix to the next release of component.

taxonomy-nodes

avatar thanhnv37 thanhnv37 - open - 25 May 2024
avatar joomla-cms-bot joomla-cms-bot - change - 25 May 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 May 2024
avatar Hackwar
Hackwar - comment - 28 Jul 2024

Which joomla version is this? Because we changed several things in 5.0 and this could already be fixed there.

avatar thanhnv37
thanhnv37 - comment - 29 Jul 2024

Hi @Hackwar,

This issue is still persists in the latest version 5.1.2.
You can follow steps that I provided above to reproduce this issue.

avatar hendrikbehncke
hendrikbehncke - comment - 22 Oct 2024

The issue persists in 5.2.
It also happens when there are categories with the same title but a different parent category. Then only the last category will exist in the filter.

Would it be solved if the alias from #__finder_taxonomy would be queried here? https://github.com/joomla/joomla-cms/blob/5.2-dev/administrator/components/com_finder/src/Indexer/Query.php#L554

At least one could change the alias and still use the same title for categories.

avatar Quy Quy - change - 11 Nov 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-11-11 15:45:41
Closed_By Quy
avatar Quy Quy - close - 11 Nov 2024
avatar Quy
Quy - comment - 11 Nov 2024

Please test PR #44437. Thanks.

Add a Comment

Login with GitHub to post a comment