Skip to content

[4.1] Smart Search: Fix missing taxonomy language string#36748

Merged
bembelimen merged 5 commits intojoomla:4.1-devfrom
Hackwar:4.2-finder-language
Mar 3, 2022
Merged

[4.1] Smart Search: Fix missing taxonomy language string#36748
bembelimen merged 5 commits intojoomla:4.1-devfrom
Hackwar:4.2-finder-language

Conversation

@Hackwar
Copy link
Member

@Hackwar Hackwar commented Jan 20, 2022

Summary of Changes

Smart Search tries to create its own language keys for the indexed taxonomies. Unfortunately, when there is no language string for the key, we get a "Search by PLG_FINDER_QUERY_FILTER_BRANCH_S_SOMETHING" in the search form in the frontend. This PR checks if a translation for the language key exists and if there is none (and debug is not enabled) it will instead display the taxonomy title instead.

Testing Instructions

  1. If you don't have the effect already, we need to add a fake taxonomy. Go to plugins/finder/content/content.php and add $item->addTaxonomy('Test', 'Strange'); after line 342.
  2. Reindex your site with the button in the backend.
  3. Go to the advanced search form in the frontend and see a dropdown with the label "Search by PLG_FINDER_QUERY_FILTER_BRANCH_S_TEST".
  4. Enable debugging and see that the string didn't change.
  5. Apply PR.
  6. See that the string didn't change with debugging enabled.
  7. Disable debugging.
  8. See now that the string is "Search by Test"

@Hackwar Hackwar changed the title [4.2] Smart Search: Fix missing taxonomy language string [4.1] Smart Search: Fix missing taxonomy language string Jan 20, 2022
@Fedik
Copy link
Member

Fedik commented Feb 20, 2022

I have tested this item ✅ successfully on ee8d768


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36748.

@Fedik
Copy link
Member

Fedik commented Feb 20, 2022

Enable debugging and see that the string didn't change.
Apply PR.
See that the string didn't change with debugging enabled.
Disable debugging.

Or can just reindex again

@jwaisner
Copy link
Member

I have tested this item ✅ successfully on ee8d768


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36748.

1 similar comment
@jwaisner
Copy link
Member

I have tested this item ✅ successfully on ee8d768


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36748.

@jwaisner
Copy link
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36748.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Feb 22, 2022
@bembelimen bembelimen merged commit 818f15f into joomla:4.1-dev Mar 3, 2022
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Mar 3, 2022
@bembelimen
Copy link
Contributor

Thx

@bembelimen bembelimen added this to the Joomla 4.1.1 milestone Mar 3, 2022
@Hackwar Hackwar deleted the 4.2-finder-language branch September 7, 2022 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants