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.
The correct operation of indexing articles for search.
A "finder" plugin has had an error.
Joomla! 5.0.3 Stable
PHP 8.2.9
Nginx 1.24.0
Linux (Azure Cloud)
Mysql 8.0.35
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.
Labels |
Added:
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-03-19 09:48:22 |
Closed_By | ⇒ | Hackwar |
I created a PR with #43093. Please test. Since we have a PR, I'm closing this issue.