Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Not too sure (yet) what is causing this error, but if I disable the boost module, my cron.php works just fine.
Then I turn ON boost, make sure there is at least one page cached (i.e. my home page) and then I do cron.php again. At that point it breaks and I get no info in any log other than a "Page not Found", specifically saying that node/1, which is my front page, does not exist.
node/1 does work just fine, thank you. But I was wondering how can I debug that?!
Thank you.
Alexis
P.S. I am NOT using the CRON crawler.
Comment | File | Size | Author |
---|---|---|---|
#11 | boost-619934.1.patch | 926 bytes | mikeytown2 |
#6 | boost-619934.patch | 875 bytes | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedInteresting. Here's the boost_cron() hook
Not really sure why it would be bombing on you... that an odd error.
Well we need to rule out what code is causing the errors...
// Crawl Site - Not an issue, you said its disabled.
// Update Stats - Try Disabling this, go into the boost block for AJAX stats and unchecked the show stats checkbox.
Next if your still getting the error uncheck BOOST_CHECK_BEFORE_CRON_EXPIRE (Check database timestamps for any site changes. Only if theres been a change will boost flush the expired content on cron.)
Finally set the variable_get('boost_expire_cron', TRUE) to Disabled (Clear expired pages on cron runs:).
If your still getting the error then it's not in the boost_cron hook since all effective code in there will not run.
Comment #2
jbrauer CreditAttribution: jbrauer commentedI'm getting similar behavior. Though the log says cron runs I'm getting a page not found error when I go to cron.php... and having the related issue of pages not being purged on cron runs.
Comment #3
AlexisWilke CreditAttribution: AlexisWilke commentedmikeytown2,
The problem is BEFORE the drupal_cron_run() because when I add a statement to write something in the output when entering that function, I get it at the END the "Not found" page.
Now I see that you have one hook_boot() and one hook_exit() function...
I'm still testing. So far, it generates the pages and often it gets stuck (it does not even reach the drupal_cron_run() function!). 8-P
Thank you.
Alexis Wilke
Comment #4
AlexisWilke CreditAttribution: AlexisWilke commentedmikeytown2,
Okay, got the location, not the very reason, but I know what causes the problem.
That's part of the boost_init() function. I guess you wrote that a long time ago and did not remember you were calling drupal_not_found() in there...
So... as you can see, I commented the code out and it works like a charm. Of course, there may be a bit of a problem with that not having that special feature. I guess that your array_shift() × 2 remove the cron.php name from the path and now it looks empty and "fail" the test above.
Let us know how we should fix that function.
Thank you.
Alexis Wilke
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedNope, I wrote that very recently to fix an old bug #345484: 404 hits to /files directory cached as homepage with broken form actions. Try this latest patch, based off of what my server output I hopefully can isolate this so the 404 only happens when it should. Can you test that you get a 404 when you visit this URL
example.com/sites/default/files/
In short I'm working around a core bug... if you hit a dir that exists but doesn't have an index.php file then you get a 200 and the home page instead of a 404. This was bad because boost would then cache that page.
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedComment #7
AlexisWilke CreditAttribution: AlexisWilke commentedThe following also works...
I tried with update.php and it works fine. The only other page would be install.php and I'm really not worried about that one!
I do not know whether we can call this is a fix, but it does work. Another way is to use cron.php?q=something, but that could have some other unknown side effects...
Thank you.
Alexis Wilke
Comment #8
AlexisWilke CreditAttribution: AlexisWilke commentedOkay, got your patch... shall I change the lone '=' with a '==' in the last entry?
I tried the path you asked me to test, and I get a 403. (forbidden) I guess that my Apache is forbidding me from listing folders.
Thank you.
Alexis Wilke
Comment #9
AlexisWilke CreditAttribution: AlexisWilke commentedI guess REDIRECT_STATUS is not set when I hit that line so it works. 8-)
I just changed the = 404 into == 404 as, I suspect, was intended.
Thank you for your quick replies.
Alexis
Comment #10
mikeytown2 CreditAttribution: mikeytown2 commentedCan you check that it still fixes the bug?
Comment #11
mikeytown2 CreditAttribution: mikeytown2 commentedHere's a better patch taking a hint from you.
Comment #12
jbrauer CreditAttribution: jbrauer commentedThe line in #9 resolves this issue and doesn't seem to break anything else...
Comment #13
AlexisWilke CreditAttribution: AlexisWilke commentedmikeytown2,
That works great. (#11) 8-)
I have another problem with CRON, but I think that's a node I created earlier that's invalid.
Thank you.
Alexis
Comment #14
mikeytown2 CreditAttribution: mikeytown2 commentedCommitted #11
Comment #15
W.M. CreditAttribution: W.M. commentedI applied the patch at #11 and it works. The cron problem has disappeared. I guess all these fixes will be integrated in the next stable release?!
Comment #16
mikeytown2 CreditAttribution: mikeytown2 commented@Geir19
Yep, next release should be soon I hope & hopefully it will be a very stable one like 1.03 was.