Skip to content
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

[5.1][com_finder] check if finder content plugin is enabled #42299

Closed
wants to merge 18 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ public function display($cachable = false, $urlparams = [])
);
$this->app->enqueueMessage(Text::sprintf('COM_FINDER_INDEX_PLUGIN_CONTENT_NOT_ENABLED_LINK', $link), 'warning');
}

if (!PluginHelper::getPlugin('finder')) {
$url = 'index.php?option=com_plugins&filter[folder]=finder';
$link = HTMLHelper::_('link', Route::_($url), Text::_('COM_FINDER_FINDER_PLUGINS'), 'class="alert-link"');
$this->app->enqueueMessage(Text::sprintf('COM_FINDER_INDEX_PLUGIN_FINDER_NOT_ENABLED_LINK', $link), 'warning');
}
}

// Check for edit form.
Expand Down
2 changes: 2 additions & 0 deletions administrator/language/en-GB/com_finder.ini
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ COM_FINDER_FILTERS_N_ITEMS_UNPUBLISHED="%d filters unpublished."
COM_FINDER_FILTERS_N_ITEMS_UNPUBLISHED_1="Filter unpublished."
COM_FINDER_FILTERS_TABLE_CAPTION="Filters"
COM_FINDER_FILTERS_TOOLBAR_TITLE="Smart Search: Search Filters"
COM_FINDER_FINDER_PLUGINS="Smart Search Finder Plugins"
alikon marked this conversation as resolved.
Show resolved Hide resolved
COM_FINDER_HEADING_CHILDREN="Maps"
COM_FINDER_HEADING_CREATED_BY="Created By"
COM_FINDER_HEADING_CREATED_BY_ASC="Created By ascending"
Expand Down Expand Up @@ -147,6 +148,7 @@ COM_FINDER_INDEX_NO_DATA="No content has been indexed."
COM_FINDER_INDEX_OPTIMISE_FINISHED="Optimisation finished."
COM_FINDER_INDEX_PLUGIN_CONTENT_NOT_ENABLED="The Smart Search Content Plugin is disabled. Changes to content will not update the Smart Search index until the Plugin is enabled."
COM_FINDER_INDEX_PLUGIN_CONTENT_NOT_ENABLED_LINK="The %s is disabled. Changes to content will not update the Smart Search index if you do not enable this plugin."
COM_FINDER_INDEX_PLUGIN_FINDER_NOT_ENABLED_LINK="The %s are disabled. Changes to content will not update the Smart Search index if you do not enable these plugins."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we make one (new?) constant to cover both cases (as they have the same text) and deprecate the other two?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we can
but out of scope of this pr

COM_FINDER_INDEX_PURGE_FAILED="Failed to delete selected items."
COM_FINDER_INDEX_PURGE_SUCCESS="All items have been deleted."
COM_FINDER_INDEX_SEARCH_DESC="Search in title, URL and last updated date."
Expand Down