The anticipated outcome is to view the plugin's content, specifically the contact module position, or alternatively, the removal of the shortcode from the search result.
Upon searching for "contact," the result displays the shortcode instead of the expected content.
Joomla Version: Latest - Joomla 5.
Presenting the shortcode to users is currently not meaningful. It would be beneficial to implement a mechanism allowing content plugins to exclude their shortcodes from the search results. Another approach could involve utilizing the process content plugins on the Smart Search results. This can be achieved by incorporating the following code into the file components/com_finder/tmpl/search/default_result.php:
$full_description = HTMLHelper::_('content.prepare', $full_description);
Labels |
Added:
No Code Attached Yet
|
Title |
|
Apologies for the confusion; it appears I made an error. In reality, it does work with the loadposition in Joomla 5. I mistakenly tested it with a third-party content plugin, but my initial example involved loadposition. I've performed the tests again and it's working properly.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-12-11 15:02:21 |
Closed_By | ⇒ | machadoug |
Thanks for checking and reporting back.
@machadoug The "[5.1]" in the title of your issue is misleading as this means it would only apply to the upcoming 5.1, but as far as I understand your issue is for the latest Joomla 5 version, which is 5.0.1. I will fix the title in a minute.
The alternative solution, removal of the shortcode from smart search results, has been released with 4.3.5 with PR #38998 and has been merged up into the 4.4-dev and 5.0-dev branches, see here for 5.0-dev: https://github.com/joomla/joomla-cms/blob/5.0-dev/plugins/content/loadmodule/src/Extension/LoadModule.php#L67-L82 . The corresponding issue was #38599 . @MacJoom Any idea why this might not be working with 5.0.1?