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.
The search results displays all items by default (since all nodes selected)
Display only some items, because the Search modal merge node by their title, so the query not include all ids of selected nodes.
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.
Labels |
Added:
No Code Attached Yet
|
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.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-11-11 15:45:41 |
Closed_By | ⇒ | Quy |
Which joomla version is this? Because we changed several things in 5.0 and this could already be fixed there.