Modified the storage format of taxonomy filters in the processStaticTaxonomy method
Changed from using taxonomy title as array key to using numeric indexing
Prevents overwriting of filters when multiple taxonomies share the same title but belong to different categories
Testing Instructions
Install Joomla with sample data
Create multiple Smart Search Filters that use taxonomy filters
Create taxonomy items with the same title but in different categories
Apply these filters to a Smart Search module or menu item
Verify that all matching items are displayed correctly, regardless of their category
Actual result BEFORE applying this Pull Request
When multiple taxonomy items have the same title but belong to different categories, only the last one is kept in the filter array because the title is used as the array key, causing earlier items with the same title to be overwritten.
Expected result AFTER applying this Pull Request
All taxonomy items are correctly preserved in the filter array, even when they share the same title, because they are stored using numeric indices instead of using the title as the array key.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
I understand what you are trying to do, but this unfortunately is an incomplete fix. There are 3 places, where $this->filters is written to and they all use the title. So we would need to fix all of them. At the same time the title is also used in administrator/components/com_finder/src/Service/HTML/Query.php and that would break with this change. Maybe we could work directly with the whole object from the database, but then this would have to wait until Joomla 6 to be merged. The way this is now we unfortunately can't merge this.
Hi, we updated the search filter fix and keep the title but index the array by id. The places where the title was accessed are also updated to use the id indexed array.
Sorry this slipped under the radar, it would be really great if someone could look into the updated fix.
@thanhnv37 @hendrikbehncke please test this Pull Request.