bug PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar filipores
filipores
11 Nov 2024

Pull Request for Issue #43528 .

Summary of Changes

  • 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

  1. Install Joomla with sample data
  2. Create multiple Smart Search Filters that use taxonomy filters
  3. Create taxonomy items with the same title but in different categories
  4. Apply these filters to a Smart Search module or menu item
  5. 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

avatar filipores filipores - open - 11 Nov 2024
avatar filipores filipores - change - 11 Nov 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Nov 2024
Category Administration com_finder
avatar filipores filipores - change - 11 Nov 2024
Title
[Smart Search][#43528] Fix taxonomy filter overwriting when titles are identical
[Smart Search] Fix taxonomy filter overwriting when titles are identical
avatar filipores filipores - change - 11 Nov 2024
Title
[Smart Search] Fix taxonomy filter overwriting when titles are identical
[#43528] [Smart Search] Fix taxonomy filter overwriting when titles are identical
avatar filipores filipores - edited - 11 Nov 2024
avatar filipores filipores - change - 11 Nov 2024
The description was changed
avatar joomla-cms-bot joomla-cms-bot - edited - 11 Nov 2024
avatar filipores filipores - edited - 11 Nov 2024
avatar fgsw
fgsw - comment - 12 Nov 2024

@thanhnv37 @hendrikbehncke please test this Pull Request.

avatar hendrikbehncke
hendrikbehncke - comment - 13 Nov 2024

I have tested this item successfully ✅

avatar filipores filipores - change - 21 Nov 2024
Labels Added: PR-5.2-dev
avatar Hackwar
Hackwar - comment - 22 Nov 2024

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.

avatar fgsw
fgsw - comment - 27 Nov 2024

@hendrikbehncke How to mark a test as successfull:

Now the test count as successfull.

This info is not for this Pull Request by the comment of @Hackwar above.

avatar filipores filipores - change - 28 Nov 2024
Labels Added: bug
avatar joomla-cms-bot joomla-cms-bot - change - 28 Nov 2024
Category Administration com_finder Administration com_finder Front End
avatar hendrikbehncke
hendrikbehncke - comment - 8 Jan 2025

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.

Add a Comment

Login with GitHub to post a comment