I try to set up automatic reindexing content in Joomla with module Smart Search.
http://docs.joomla.org/Setting_up_automatic_Smart_Search_indexing
Joomla 2.5.3
When i login by ssh to server and run script I get a fatal error… and save some posts (search index results on 8 pages).
Does somebody know how to solve this problem?
* Processed batch 1 in 0.213 seconds.
* Processed batch 2 in 0.182 seconds.
* Processed batch 3 in 0.177 seconds.
* Processed batch 4 in 0.009 seconds.
PHP Fatal error: Class 'JModuleHelper' not found in / var / wolq.ru / plugins / content / acepolls / acepolls.php on line 41
Fatal error: Class 'JModuleHelper' not found in / var / wolq.ru / plugins / content / acepolls / acepolls.php on line 41
41-42 lines in acepolls.php:
$module = JModuleHelper::getModule('mod_acepolls');
$content = self::_renderModule($module, array(), $id);
If i run reindexing from web-interface – it’s run succesfull and save search index results on 26 pages.
I havn’t got the source code for mod_acepolls, so I’m not 100% about this but anyway:
Normally when running Joomla trough the web interface, Joomla builds its web page using the JDocumentHTML class. The thing is that the file that defines JDocumentHTML also imports the JModuleHelper. So when mod_acepolls is running by the web interface, then the JModuleHelper is already imported.
The simplest solution to this is to import JModuleHelper in finder_indexer.php (the file I guess you run using CLI/Cron). Find the lines that already does some importing (about line 45) and insert the following:
Its important to remember that this might break if you upgrade the website.