Not a bug XF 1.2 Upgrade - Cron Error

Alien

Well-known member
After successful upgrade, this showed up waiting for me (two listings) in the server error logs.

It also now occurs once every minute. All updated files were uploaded...

Server Error Log
Error Info
ErrorException: Fatal Error: Class 'XenForo_Cron' not found - cron.php:12
Generated By: Unknown Account, A moment ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(41) "http://***.***.com/cron.php?1349611467"
["_GET"] => array(1) {
[1349611467] => string(0) ""
}
["_POST"] => array(0) {
}
}
 
The XenForo_Cron system was replaced with a deferred system, so it looks like an add-on may be calling a cron that is no longer available (due to the update in systems). Most likely need to test one by one to find out which one doesn't work.
 
OK disabling add-ons still produced the error, but it could be an add-on's additional cron entries as you have stated.

I had 4 addon-related cron entries there, and I've now disabled those manually as well to test. I'll then enable them one by one to see which is the culprit and post the results.
 
OK, I was getting them sometimes even 3-4 times within a minute.

Now that I have disabled the 4, I have not yet received new error log listings...

I'll give it 10 minutes, then re-enable them and isolate it. Could be taigachat (2 entries), digitalpointspy, or my custom confessions cron.
 
Check your templates for cron.php (I forget what template it was in before 1.2)... It's no longer a valid file in XenForo. My guess is you have a customized template that still has it.
 
Check your templates for cron.php (I forget what template it was in before 1.2)... It's no longer a valid file in XenForo. My guess is you have a customized template that still has it.

I have no cron.php in any templates.

I also re-uploaded all cron-related files from the original package downloaded earlier today, in case something went corrupt during upload. Errors still occurred.

I also tried isolating the cron entries, and re-enabled them one by one and now don't get any error at ALL.

This is puzzling to be sure...
 
Well *something* is making end user's browser call cron.php. On a side note, you can delete cron.php, since it's not even part of 1.2 (it's left over from old version), and at least you won't get server errors logged, but the server will still kick back a 404 for requests for it. Still doesn't get to the root of the issue of what is making cron.php get called though... Maybe it's a search engine spider that is respidering it or something... might want to check web server logs to check user agent.
 
I've re-enabled all add-ons and crons, and so far no additional error messages.

I usually go through and remove all files that are no longer used in the latest package, so I don't *think* I have any cron.php anymore but I'll double check thanks for that.

I'll also check the web logs to see if I had some cron.php hits during my error window!
 
Well it still doesn't solve *why* it was being hit though... If you use the option of sending templates to the file system for use, I'd just grep your whole website directory and see if it's ANYWHERE... in any PHP files, JS files, templates, etc...
Code:
grep -R cron.php
 
I just upgrade to 1.2.1 and I am getting the exact same error log.

Code:
Error Info
ErrorException: Fatal Error: Class 'XenForo_Cron' not found - cron.php:12
Generated By: Unknown Account, 6 minutes ago

Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}

Request State
array(3) {
  ["url"] => string(49) "http://www.site.com/forum/cron.php?1360519619"
  ["_GET"] => array(1) {
    [1360519619] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

Anyone knows a fix ?
 
I noticed that after removing the file and waiting about 30 minutes, all errors seem to go away and I haven't had it occur again.

Of course, before I did that I turned off and on all my add-ons and crons manually trying to isolate the problem. Some combination of that seems to work.

I also did what digitalpoint suggested above, and I had *no* occurrences of calls to that outdated cron.php file on my server. Weird.
 
I am getting this error from updating 1.1.5 to 1.2.2

Code:
Error Info
ErrorException: Fatal Error: Class 'XenForo_Cron' not found - cron.php:12
Generated By: Unknown Account, A moment ago
Stack Trace

#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}

Request State

array(3) {
  ["url"] => string(51) "http://www.truckmountforums.com/cron.php?1375595563"
  ["_GET"] => array(1) {
    [1375595563] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

Do I delete that file cron.php in root? or what?
 
Top Bottom