Skip to content

[5.3] Optimize load of smart search plugins language #45345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 5.3-dev
Choose a base branch
from

Conversation

Denitz
Copy link
Contributor

@Denitz Denitz commented Apr 17, 2025

Summary of Changes

Currently, \Joomla\Component\Finder\Administrator\Helper\LanguageHelper::loadPluginLanguage() uses a database query to get list of available finder plugins and next loads their language files.

This database query is useless because we can use native PluginHelper::getPlugin('finder') method which provides additional benefit (no extra database query is executed).

Additionally, the language load should be performed using system-wide $extension key like plg_finder_content to prevent duplicate language file load.

This method is called in all com_finder views plus mod_finder display, we can remove extra database and prevent duplicate language load.

Testing Instructions

Apply patch. Test smart search views in frontend, check smart search module display.

Actual result BEFORE applying this Pull Request

See extra database query like

SELECT `name`,`element`
FROM `jos_extensions`
WHERE `type` = 'plugin' AND `folder` = 'finder' AND `enabled` = 1

Expected result AFTER applying this Pull Request

All views and module work as usual, no extra database query

Link to documentations

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed

@Denitz Denitz changed the title Optimize load of smart search plugins language [5.3] Optimize load of smart search plugins language Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants