Fatal error: Call to undefined function supercron_module_invoke_all_cron() in /home/www/servers/v2/supercron.php on line 89
| Comment | File | Size | Author |
|---|---|---|---|
| #34 | 747118-fatal-error-or-supercron.php-warning-33.patch | 4.02 KB | bcmiller0 |
| #33 | 747118-fatal-error-or-supercron.php-warning-33.patch | 4.1 KB | bcmiller0 |
Comments
Comment #1
geerlingguy commentedI'm getting the following when loading the Crontab configuration page:
Fatal error: Call to undefined function supercron_standard_path() in /home/review/public_html/sites/all/modules/supercron/supercron.crontab-admin.inc on line 38
...and I'm also getting the same fatal error when running cron via example.com/cron.php
Fatal error: Call to undefined function supercron_module_invoke_all_cron() in /home/review/public_html/supercron.php on line 89
[Edit: Finally, I'm getting a message on my site that the supercron.php file hasn't been copied to the site root directory... when, in fact, it has. Here's the message that's popping up (below):]
[Edit 2: I also am now getting the following fatal error if I invoke all the cron tasks manually at admin/settings/supercron (below):]
Fatal error: Call to undefined function supercron_get_script_url() in /home/review/public_html/sites/all/modules/supercron/supercron.inc on line 327
Comment #2
MisterSpeed commentedThanks ! We're looking at this, but are bumping heads with a deep issue with Drupal not going through its full bootstrap, so the drupal_get_path function fails. We'll probably only get back to this in about a week though as the staff is on vacation next week. We'll advance the module so that we can share code with the D7 version at the same time.
Comment #3
jannalexx commentedsupercron.admin.js located in wrong directory http://drupal.org/node/748496
check if this one solves any of those errors
Comment #4
jgcracknell2 commentedHi
moving .js to the js directory doesn't solve the issue I still get the error message on line 38
Comment #5
Oscar Illada commentedI'm getting the following when loading the Crontab configuration page too.......
Fatal error: Call to undefined function supercron_standard_path() in sites/all/modules/supercron/supercron.crontab-admin.inc on line 38
but if a run the cron or if i do somethings(who knows!!), it works..
Help please!!!!!
Thanx Oscar
Comment #6
MisterSpeed commentedWe got rid of an underlying issue with out-of-order Drupal bootstrap calls that should resolve the issue; we'll commit code in a few days.
Comment #7
MisterSpeed commentedShould be fixed in the latest release; if not pls re-open. Thanks !
Comment #8
nardberjean commentedI see no real change with the latest -dev. supercron.php file has same modification date as previous version.
Comment #9
MisterSpeed commentedDid you try it ? supercron.php has almost no functionality left in it, otherwise roughly 40% of the code has changed.
Comment #10
nardberjean commentedThanks to let me know!
Comment #11
geerlingguy commentedn/p
Comment #13
TallDavid commentedProblem is still occurring on the May 16, 2010 version of dev code:
Note to self: ttoh
Comment #14
ddv commentedI downloaded and installed the May 16 build this morning and was getting both errors:
Fatal error: Call to undefined function supercron_module_invoke_all_cron() in
/home/.morna/[user]/[mysite]/supercron.php
on line 89
(when clicking on the configuration tab)
and
The supercron.php file should be copied from the /home/[user]/[mysite]/modules/supercron directory to /home/[user]/[mysite]/; until that is done, your cron-driven tasks will not execute when scheduled to.
Then the first error mysteriously disappeared by the time I found this thread (1/2 hour?). Once able to access the configuration screen, I changed the location of supercron.php from the /modules/supercron setting to the drupal root directory and when I went back to the Settings tab, the warning was gone.
Comment #15
ddv commentedAs of 9 am today, I started getting
Fatal error: Call to undefined function supercron_module_invoke_all_cron() in /home/[user]/[mysite]/supercron.php on line 89.
every hour on the hour.
but it seems to run fine if invoked manually through the "Invoke all cron jobs" link (to http://[mysite]/admin/reports/status/run-supercron).
Comment #16
ddv commentedUpdate:
I still get the fatal error message -- even with the entire list disabled.
And I have the "supercron.php file should be copied from..." error back again. So I tried to access the configuration settings, but when I click on that tab now I get: Fatal error: Call to undefined function supercron_standard_path() in /home/.morna/[user]/[mysite]/modules/supercron/supercron.crontab-admin.inc on line 38"
Comment #17
kroza commentedI made it works in this way:
Comment #18
sajosh commentedAdding comment #17 line fixed it for me. Now the page loads.
For the module developers, I have ...
D6.17,
; Information added by drupal.org packaging script on 2010-07-11
version = "6.x-2.x-dev"
core = "6.x"
project = "supercron"
datestamp = "1278835830"
Comment #19
Anonymous (not verified) commentedAlso add #17 in supercron.php before
supercron_invoke_one($module, FALSE, $multithread);Comment #20
sf_wind commentedsubscribe.. waiting to see whether there is any solution...
Comment #21
Andy B commentedsubscribe
Also waiting for an update. Just tried #17's trick as well as putting it in supercron.php. Now off to see how it works...
Update: I was able to access the crontab settings page after changing the code in #17. I tried putting it in supercron.php but it had no affect. Remaining issues are:
1. I keep getting reminded to make sure supercron.php is located in the right place. It says that supercron.php should be copied to "e:\www\public_html\[username]\drupal\index.php\supercron.php". I have no idea why index.php is even included in the path.
2. Assuming that this is related, I can't save changes to the supercron.php schedule.
Any ideas of an alternative cron module until this gets fixed? I don't have access to crontab creation but I also don't want to rely on page hits to run cron either.
Comment #22
geerlingguy commented@Andy B: http://drupal.org/project/elysia_cron
Comment #23
Andy B commentedHere is a summary of what to do in almost all cases to get rid of these errors:
1. Edit sites/all/modules/supercron/supercron.crontab-admin.inc. Look for the following lines of code:
function supercron_invocation_form(&$form_state) {
$module_path = drupal_get_path('module', 'supercron');
drupal_add_js("{$module_path}/js/ZeroClipboard.js");
drupal_add_js("{$module_path}/js/supercron.crontab.js");
drupal_add_js(array('supercron_module_path' => drupal_get_path('module', 'supercron')), 'setting');
2. After the last line of code above, put the following line of code:
module_load_include('inc', 'supercron', 'supercron-main');
3. Save the supercron.crontab-admin.inc file.
4. Copy supercron.php to a folder of your choice (probably the drupal root).
5. Edit supercron.php. At the top of the file, look for the commented out variable $drupal_dir and do the following to it:
A. Remove the comments.
B. between the apostrophes, type the absolute path to supercron.php. Don't include supercron.php itself and don't include a trailing /.
6. in supercron.php, look for the line:
supercron_invoke_one
7. Just above it, add the following line of code:
module_load_include('inc', 'supercron', 'supercron-main');
8. Save supercron.php and close it.
9. In drupal, go to Administrate>Site configuration>Super cron.
10. Click crontab tab.
11. In the section that asks where supercron.php is located, click other and type the exact same path as you did for the $drupal_dir variable.
12. Click save.
Everywhere you go now, you wont be reminded to set your supercron.php path and the crontab page now loads without errors. Now the suspenseful wait to see if my hosting company will give me the absolute path for php.exe so I can setup the cron jobs for each module. Can the developer at least add these changes to the module code so everyone doesn't have to customize it?
Comment #24
MisterSpeed commentedYes; I am back from vacations. Will follow-up on open tickets and post a new version.
Comment #25
Dubber Dan commentedThanks Andy B, that worked like a charm.
Comment #26
imb123 commentedBefore, I try the solution on number 23, has a patch been issued for this?
Comment #27
bibo commentedI'm downgrading to 1.3.
Without this fixed, the 2.x-dev branch is worthless.
Comment #28
bibo commentedFYI, the downgrade to 1.3 caused great chaos on the site (apparently because of my uninstall failed). Great chaos being things like panels and views not displaying, modules and includes loading in wrong order etc.
I've since moved to elysia_cron, which actually feels reliable.
Comment #29
murzThank's! Adding string from #17 post solve the problem for me!
But I added this string to supercron.php in root of site, before string
supercron_module_invoke_all_cron();After that I have this code at end of site:
Comment #30
cor3huis commentedSame issue Fatal error: Call to undefined function supercron_module_invoke_all_cron() experienced here.
The Fix on #23 http://drupal.org/node/747118#comment-3349988 worked for me. However the solution is appreciated IMHO however somewhat messy.
BTW I recall there is the /scripts/drupal.sh which can be called like:
As long as you modified drupal.sh and set the correct php executable to use in the first line of this script, e.g. #!/usr/local/php5/bin/php
It is maybe best just to look in in this script and implement something good from this into the supercron initialization fase
Comment #31
bcmiller0 commentedtried suggestions above and i'm still having the same issue.
Comment #32
bcmiller0 commentedthis seems in my case to boil down to this:
supercron.inc:
define('SUPERCRON_SCRIPT_PATH_MODULE_ROOT', 2); ????? why is this ???
define('SUPERCRON_SCRIPT_PATH_DRUPAL_ROOT', 1);
define('SUPERCRON_SCRIPT_PATH_MODULE_ROOT', 2);
define('SUPERCRON_SCRIPT_PATH_CUSTOM', 3);
why is this defined as constanct of 2 ???
it is compared here to the variable in file supercron.admin.inc
so it always fails:
function _supercron_check_requirements() {
$supercron_script_path = variable_get('supercron_script_path', SUPERCRON_SCRIPT_PATH_MODULE_ROOT);
if ($superccron_script_path == SUPERCRON_SCRIPT_PATH_DRUPAL_ROOT) {
in fact this is uses in supercron-main.inc as well:
function supercron_get_script_URL() {
global $base_url;
$script_path = variable_get(SUPERCRON_SCRIPT_PATH, SUPERCRON_SCRIPT_PATH_MODU\
LE_ROOT);
if ($script_path === SUPERCRON_SCRIPT_PATH_DRUPAL_ROOT) {
return $base_url .'/'. SUPERCRON_SCRIPT_NAME;
}
elseif ($script_path == SUPERCRON_SCRIPT_PATH_MODULE_ROOT) {
return url(drupal_get_path('module', 'supercron') . 'supercron.php', array(\
'absolute' => TRUE));
Comment #33
bcmiller0 commentedok this seems to solve at least the warning condition for my setup, and also fixes settings on the 'crontab configuration' page as well.
See patch, seems problem with defines for form used for values when not correct. Probably needs to be cleaner saving these items in the same inc file for re-use in others, but got rid of my warning for now.
Comment #34
bcmiller0 commentedi did that too fast, and left in my debugging, sigh sorry. here is a better patch.
Comment #35
bcmiller0 commentedI think the patch on this http://drupal.org/node/994294#comment-3815738 (issue 994294) will resolve issues seen on this page.
Comment #36
escoles commentedFYI, seeing this error in the most recent dev release @ this date.
Comment #37
subwoofer commentedI am also receiving this error on the latest release
Comment #38
ghmercado commentedandy B's solution (http://drupal.org/node/747118#comment-3349988) worked for me.
humbly suggest to devs to postpone version 2 for the meantime until this rather serious error finally get licked. Otherwise supercron is awesomest amongst all cron measures I've tried.
Comment #39
Danzki commentedAndy B solution fixes my crontab, however I still get the warning about moving my supercron.php to the root location.
My crontab settings are "module root".