{"action":"created","issue":{"url":"https://api.github.com/repos/Flagbit/Magento-FACTFinder/issues/179","repository_url":"https://api.github.com/repos/Flagbit/Magento-FACTFinder","labels_url":"https://api.github.com/repos/Flagbit/Magento-FACTFinder/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/Flagbit/Magento-FACTFinder/issues/179/comments","events_url":"https://api.github.com/repos/Flagbit/Magento-FACTFinder/issues/179/events","html_url":"https://github.com/Flagbit/Magento-FACTFinder/issues/179","id":175063580,"number":179,"title":"Autoloader missing for Tracking Queue Processing Cron Job","user":{"login":"Shadowsvoices","id":11006964,"avatar_url":"https://avatars.githubusercontent.com/u/11006964?v=3","gravatar_id":"","url":"https://api.github.com/users/Shadowsvoices","html_url":"https://github.com/Shadowsvoices","followers_url":"https://api.github.com/users/Shadowsvoices/followers","following_url":"https://api.github.com/users/Shadowsvoices/following{/other_user}","gists_url":"https://api.github.com/users/Shadowsvoices/gists{/gist_id}","starred_url":"https://api.github.com/users/Shadowsvoices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shadowsvoices/subscriptions","organizations_url":"https://api.github.com/users/Shadowsvoices/orgs","repos_url":"https://api.github.com/users/Shadowsvoices/repos","events_url":"https://api.github.com/users/Shadowsvoices/events{/privacy}","received_events_url":"https://api.github.com/users/Shadowsvoices/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-05T12:42:22Z","updated_at":"2016-09-05T12:55:34Z","closed_at":null,"body":"The FACT-Finder Lib Autoloader is registered on Magento Event \"controller_front_init_before\".\r\nThis event is not triggered in Cron Context (cron.php) and therefor the Autoloader is not registered.\r\n\r\nThis can easily be fixed by registering the autoloader in the Cron Job entry-point method like so:\r\n**FACTFinder_Tracking_Model_Observer#processOrderQueue()**\r\n\r\n``` php \r\n    public function processOrderQueue()\r\n    {\r\n        if (!Mage::helper('factfinder')->isEnabled('tracking')) {\r\n            return;\r\n        }\r\n\r\n        // Autoloader is initialized on controller_front_init_before which is NOT called in cron context, load it now\r\n        Mage::getModel('factfinder/autoloader')->addAutoloader(new Varien_Event_Observer());\r\n\r\n        $queue = Mage::getModel('factfinder_tracking/queue');\r\n\r\n        try {\r\n...\r\n```\r\n\r\n- FACT-Finder SDK version (see package.xml): 4.1.9\r\n- Magento edition and version: 1.9.2.x\r\n- PHP version: 5.6.x\r\n- Expected behavior: no failures to include files for classes \r\n- Actual behavior: lots of failures\r\n- Steps to reproduce: Trigger tracking event or manually insert into db, set error_reporting = -1, wait for cron job to run or schedule manually\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Flagbit/Magento-FACTFinder/issues/comments/244740542","html_url":"https://github.com/Flagbit/Magento-FACTFinder/issues/179#issuecomment-244740542","issue_url":"https://api.github.com/repos/Flagbit/Magento-FACTFinder/issues/179","id":244740542,"user":{"login":"xpoback","id":4457842,"avatar_url":"https://avatars.githubusercontent.com/u/4457842?v=3","gravatar_id":"","url":"https://api.github.com/users/xpoback","html_url":"https://github.com/xpoback","followers_url":"https://api.github.com/users/xpoback/followers","following_url":"https://api.github.com/users/xpoback/following{/other_user}","gists_url":"https://api.github.com/users/xpoback/gists{/gist_id}","starred_url":"https://api.github.com/users/xpoback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xpoback/subscriptions","organizations_url":"https://api.github.com/users/xpoback/orgs","repos_url":"https://api.github.com/users/xpoback/repos","events_url":"https://api.github.com/users/xpoback/events{/privacy}","received_events_url":"https://api.github.com/users/xpoback/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T12:55:34Z","updated_at":"2016-09-05T12:55:34Z","body":"Did this missing autoloader create some actual issues? "}}
{"actor":{"display_login":"xpoback"}}