splash is preventing cron.php from working properly. Instead of executing cron.php the splash page is returned.

Comments

okokokok’s picture

I'm not sure if it's the Drupal way, but here's a fix:

59c59
<
---
>
75c75,78
<
---
>
> } elseif ($_SERVER['REQUEST_URI'] == '/cron.php') {
> $splash = FALSE;
>

seanr’s picture

Before I commit this, I'd like to get a better understanding of what's going on. It doesn't seem like Drupal should be returning the splash page at all for cron.php. Exactly what settings do you have on each of the tabs?

alyawn’s picture

A work around here is to call cron with ?splash=off and it works fine:

0 * * * * wget -O - -q -t 1 http://examplesite.com/cron.php?splash=off

seanr’s picture

Component: Code » Documentation
Category: bug » support

Ah! Good call, thanks! I guess we'll need to add that to the documentation.

okokokok’s picture

It wasn't working properly and my patch fixed it. I didn't set up splash on the site where cron wasn't working anymore.

okokokok’s picture

cron calls drupal (and splash) with wget, and so the splash page gets returned (as it has never run on the wget 'browser' before), the actual cron page is working fine

Here's what we have in crontab: 35 * * * * www-data /usr/bin/wget -O - -q http://example.com/cron.php
When I tried it from the command-line wget was just fetching the splash page.

Thanks for the great module.

seanr’s picture

guaka, if you undo your patch and change your cron to this, it should work just fine:

35 * * * * www-data /usr/bin/wget -O - -q http://examplesite.com/cron.php?splash=off

alyawn’s picture

StatusFileSize
new660 bytes

The patch listed above works unless the install is located in a sub-directory. Attached is a patch that I use that takes subdirectories into account. I think it is important that this module does not interfere with cron's function. I also think that you shouldn't need to add splash=off to the cron URL. I find it difficult to remember this, so that's why I use this patch.

From what I gathered, cron calls a full init of drupal which results in all inits in all modules to be called. And in the case of the splash module, it does it's redirect in the init method. Note: this patch is for 6.x-2.5.

carlitus’s picture

Version: 6.x-2.4 » 6.x-2.x-dev
StatusFileSize
new662 bytes

Patch for the last dev

carlitus’s picture

StatusFileSize
new610 bytes

Another Patch for the 6.x-2.5, the alyawn patch doesn't work for me.

zoltán balogh’s picture

subscribe

j0nathan’s picture

Same issue.
I also think that you shouldn't need to add anything to the cron URL.

upupax’s picture

subscribing

aarontocenter’s picture

I'm really surprised that such a great module has gone so long without this being adjusted. Currently there is a [When][How][What] as options. What you need is an [Except] option. Have it default to the cron and allow people to remove the cron exception. Installing this should not require the user change anything except to configure your module. This is an amazing tool, but it could cause a simple site to shut down and cause problems, this is not the drupal way. Thank you.