No Code Attached Yet J3 Issue
avatar rbuelund
rbuelund
28 Jan 2022

Steps to reproduce the issue

Start the Smart Search indexing.

Expected result

The Indexing should finish without errors

Actual result

The Smart indexer stops at around 80%
Throws this error: Call to undefined method Joomla\CMS\Application\AdministratorApplication::getParams()

System information (as much as possible)

Joomla 3.10.5
PHP 7.4

Additional comments

It is not possible to set debug level to maximum, because then the indexer won't run at all.
The Smart Search index DOES work when Smart Search - Content plugin is disabled! - so the error seems to be in that plugin.

avatar rbuelund rbuelund - open - 28 Jan 2022
avatar rbuelund rbuelund - change - 28 Jan 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 28 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Jan 2022
avatar richard67 richard67 - change - 28 Jan 2022
Title
Error in Smart Search indexer
[3.10] Error in Smart Search indexer
avatar richard67 richard67 - edited - 28 Jan 2022
avatar richard67 richard67 - change - 28 Jan 2022
Labels Added: J3 Issue
avatar richard67 richard67 - labeled - 28 Jan 2022
avatar Hackwar
Hackwar - comment - 31 Jan 2022

This looks more like a content plugin that doesn't behave properly. There is no getParams() on an application object in the core finder plugins. However, during indexing the content plugins are run on the indexed content and quite a lot of plugins exclude themselfs when in the indexing context. This sounds a bit like a content plugin doesn't take that into consideration and runs regardless.

avatar rbuelund
rbuelund - comment - 1 Feb 2022

Just tried to deactivate all content plugins on the site and ran the indexer - the problem is still there ?

avatar Hackwar
Hackwar - comment - 1 Feb 2022

System plugins can react on content events as well, so unfortunately you would have to test that further.

avatar rbuelund
rbuelund - comment - 1 Feb 2022

Hmmm.. seems that the error is happening in a model file of a custom component on the site - but why is the smart search indexing that component ?? It has no Smart Search plugin.

avatar Hackwar
Hackwar - comment - 1 Feb 2022

As I said, most likely a plugin is acting on a content event and is including that custom component.

avatar rbuelund
rbuelund - comment - 1 Feb 2022

Is there any tips to debug on this.. it is a needle in a haystack for me..

avatar Hackwar
Hackwar - comment - 1 Feb 2022

Go to the place with the issue and before the line with the fault, put a debug_print_backtrace() https://www.php.net/manual/en/function.debug-print-backtrace
That should give you the call stack from the beginning to this point and allow you to backtrace to the plugin that is calling this.

avatar rbuelund
rbuelund - comment - 1 Feb 2022

Tried to insert this in the model file - but it is skipped, and the error just happens right after..

ob_start();
debug_print_backtrace();
$trace = ob_get_contents();
ob_end_clean();
mail("xxxxxx@xxxxxx.xx","",$trace);

avatar rbuelund rbuelund - close - 1 Feb 2022
avatar rbuelund
rbuelund - comment - 1 Feb 2022

Ahh.. i found it by inserting this line $backtrace = print_r(debug_backtrace(), true); and mailing the result.
It was the Sourcerer plugin making trouble. It has a setting to remove it from search! Thank you for your help on this.

avatar rbuelund rbuelund - change - 1 Feb 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-02-01 21:16:45
Closed_By rbuelund

Add a Comment

Login with GitHub to post a comment