WebentwicklerAt / typo3-scheduler_http

TYPO3: Scheduler via HTTP
https://forge.typo3.org/projects/extension-scheduler_http
GNU General Public License v2.0
5 stars 2 forks source link

More initialisation in the "execManual" Mode #7

Open sneopu opened 6 years ago

sneopu commented 6 years ago

We had some troubles to run the Solr Indexing Job over the "execManual" Mode.

After add some more basic initialsation in the method execManual() it works now fine.

protected function execManual($taskId, $force) {
        // setup
        $output = array();

        // START FIX (init some stuff which is necessary for the solr index task)
        \TYPO3\CMS\Frontend\Utility\EidUtility::initLanguage();
        \TYPO3\CMS\Frontend\Utility\EidUtility::initTCA();

        $GLOBALS['BE_USER'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Authentication\BackendUserAuthentication');
        $GLOBALS['BE_USER']->start();   
        // END FIX 

I don't know, if this is useful in general? Maybe you can include it.

jwtue commented 6 years ago

Very useful. Had troubles as well when executing the ke_search indexing job. This fixed it.