No Code Attached Yet
avatar VladimirHot
VladimirHot
11 Mar 2024

Steps to reproduce the issue

I can't provide steps to reproduce, the problem was initially there. The site contains more than 700 articles in various categories. After switching from Joomla 3.10 to Joomla 5, old Search plugin is not available, only Smart Search (com_finder) is available. It didn't work initially, the log showed an error:

A "finder" plugin has had an error.

Expected result

The correct operation of indexing articles for search.

Actual result

A "finder" plugin has had an error.

System information (as much as possible)

Joomla! 5.0.3 Stable
PHP 8.2.9
Nginx 1.24.0
Linux (Azure Cloud)
Mysql 8.0.35

Additional comments

After searching for the cause, a line of code was discovered that causes the error.

administrator/components/com_finder/src/Controller/IndexerController.php

202    $output = ob_get_contents();
203
204    if ($output) {
205        throw new \Exception(Text::_('COM_FINDER_INDEXER_ERROR_PLUGIN_FAILURE'));
206    }

In my case, the $output variable took the value "\n\n" when indexing, I don't know the reason for this. I tried to get around this by changing the condition:

204    if (trim($output)) {
205        throw new \Exception(Text::_('COM_FINDER_INDEXER_ERROR_PLUGIN_FAILURE'));
206    }

I’m not sure if this is correct, and why the result "\n\n" is returned, but in my case this fix helped with indexing on the site. The ticket was created because with the Joomla update this temporary fix can be overwritten with the original files. Or I'm looking for the right solution to the indexing problem.

avatar VladimirHot VladimirHot - open - 11 Mar 2024
avatar joomla-cms-bot joomla-cms-bot - change - 11 Mar 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Mar 2024
avatar Hackwar Hackwar - change - 19 Mar 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-03-19 09:48:22
Closed_By Hackwar
avatar Hackwar Hackwar - close - 19 Mar 2024
avatar Hackwar
Hackwar - comment - 19 Mar 2024

I created a PR with #43093. Please test. Since we have a PR, I'm closing this issue.

Add a Comment

Login with GitHub to post a comment