Closed (works as designed)
Project:
Boost
Version:
7.x-1.x-dev
Component:
Caching logic
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2012 at 18:40 UTC
Updated:
20 May 2014 at 19:52 UTC
Jump to comment: Most recent
Comments
Comment #1
scrypter commentedSame for me. Debian squeeze, nginx 7.67, fastcgi-php using socket, php5.3.3, Drupal 7.15. The $_boost['args'] is a global and I am getting other strange errors in watchdog with missing $_SERVER variables as well. Not necessarily a boost problem. Its like php is "losing" these arrays. When I debug print_r($_SERVER) everything is correct.
elBradford, what is your platform and versions??
EDIT just grep'd for $_boost['args'] and there is only one found so its never set! Bug I think.
Comment #2
elBradford commentedI'm on most recent version of LTS ubuntu, apache2, and php
Comment #3
scrypter commentedI commented out the ref to $_boost['args'] and it works great. VERY BAD (non) fix, but I needed to verify that it works.
Line 1396 looks like ... /*&& $_boost['args'][0] != 'admin'*/. Probably should have added a && isset($_boost['args'][0]) before that test for 'admin'.
Comment #4
bgm commentedDid you test on the latest dev?
The args are set in boost_transform_url(), called from boost_init().
They get initialize to empty.
Can you provide more specifics on where you get the notice?
* page type node/view/other/all?
* as admin/anonymous?
* does the page have an URL alias?
Comment #5
scrypter commentedDid not test the latest dev.
Page type node
Logged in as admin
Boost debug ON
URL alias YES
Comment #6
bgm commentedCan someone test on the latest dev?
Comment #7
megadesk3000 commentedI have installed latest dev. have the same problem.
Comment #8
astanley86 commentedI'm experiencing this same issue. And I believe this is causing my entire site to crash, the home page periodically gets stuck in a constant page refresh and fails to load anything and this is the only error in my log. Subscribing to see if there is a patch... thanks
Comment #9
dmegatool commentedSame error. Page aren't cached. I can see all the page getting crawled in the log but then the error. And the log line just after it is :
So it caches nothing...
EDIT : I'm on 7.x-1.0-beta2 though.
Comment #10
dmegatool commentedTried with the dev. Not working either...
Comment #11
dmegatool commentedSo is this being looking at ? In my case it makes Boost almost unusable :( .
Comment #12
bgm commentedThe initial report was for an older release and there is very little information to work with.
- is there still a "notice", and if yes, please copy-paste the full message.
- is the notice also logged to watchdog when viewing the page as anonymous? (when the cache is generated)
- when logged-in, enable the Boost status block, and see if it mentions a reason why the page is not cached to anonymous users.
Comment #13
scrypter commentedFor me, this problem still exists. See #5 above, it happens when logged in. So page is not delivered from boost cache. Don't know if its in watchdog. It is a distracting error which may be trivial OR not. There seems to be huge differences between the D6 and D7 versions of boost. Heaps of config options gone, D7 simpler. GZ compression gone? Boost could be fantastic for shared hosting because its just php code and .htaccess rules. If you have your own server, then consider varnish. There is a Drupal varnish module and Lullabot have excellent explanation on varnish configuration.
Comment #14
bgm commentedThanks for your feedback. Yes, some features are still in development (ex: gzip, see handbook or issue queue), but the general aim is to keep it simpler than in D6. And yes, bigger sites on dedicated servers should use Varnish, especially since D7 makes that easier (no need for Pressflow).
Can you respond to my questions in #12 ?
Comment #15
remaye commentedHappen to me with last dev (7.x-1.0-beta3+1-dev).
In my case, there is no page cached, although there was "accidentally" 2 pages cached today (?!), 2 pages that was never cached again after cache has been flushed...
To give feedback to #12 :
No notice in site pages.
Only php notice in watchdog (same message as initial post).
It happened on boost settings pages but also on running cron or when flushing cache
and also after running the database update page (even with no update performed)
It never happened as Anonymous.
And always same message in boost block :
Generated: not cached yet (either no one has visited the page recently, or something is preventing the cache from being generated).(... and I visited all the pages as Anonymous dozens of times)
Feel free to ask if you need some other information...
Comment #16
drupalove commentedI have a similar problem on 3 sites using 7.x-1.0-beta2 where the log file shows Notice: Undefined index: args in boost_deliver_html_page() (line 1396 of ... ... )
Taxonomy pages never get cached, often some node pages get cached.
Comment #17
capsicumpie commentedI was getting the same log message using 7.x-1.0-beta2, but oddly only when testing anonymously in Chrome. Viewing in Firefox and Safari resulted in boost creating the cache files.
The problem seemed to be in boost_exit() where drupal_page_is_cacheable() is called (line 275) - this was returning false resulting in no caching.
Clearing all cookies from Chrome resulted in boost working again, but I've not been able to reproduce the problem again.
-edit-
could be related to #1807818: Pages are not cached / not cacheable / caching won't work - except when cookies are disabled?
Comment #18
Anonymous (not verified) commentedI'll give an overview of how boost works. If you log in the a cookie is set that disables boost, this means no cache generation and no cache reading from the rewrite rules. From what you describe it appears that something set the boost cookie DRUPAL_UID in chrome but not the other browsers, hence no generation. Clearing the cookies would them start boost working agains as long as your were not logged in as a user.
Past that it's difficult to define, I too get notices about undefined arguments sent to the various functions and have not been able to trace them as they appear in differing parts and never by the same page. I have noticed that the status report does this quite frequently and believe that this is due to the HTTPRL module used for the page regeneration by the crawler which does a test to check if it is functional.
As these are "notice" level warnings, they do not seem to effect the functionality of boost as I have a spider that runs through the site generating pages and the cache is always current and appears not to have served or stored a duff page. These kinds of errors do appear to be very much on the logged in side of the site in my experience running multiple domains from a single installation. It maybe that a page edit and expiring a series of related pages by taxonomy could be the cause since if while logged in, the cache queue is generated, (and this is only a guess) it may be that one of the related pages is quite rightly not generated but the queue is passing arguments along the line when the is_cacheable returns false and therefore sends no arguments to a function. Over xmas I will see if I can debug this more throughly but I've already spent many hours on a series of "errors" that though annoying do not appear to be breaking the site in any way.
Philip
Comment #19
hanamizuki commentedSame error here.
Comment #20
Anonymous (not verified) commentedThe error is frequent (sometimes triggered by httprl and visiting the status report page), but not the result that nothing gets written, could you just confirm the permissions on your cache folders and that any subfolders have been created ?
Comment #21
firfin commentedThis might be better as a separate issue? Please advise.
For me cache files are created (but not served) for pages visited by the anonymous user. But no generation when running cron (web crawler).
I consistently get the 'undefined args' message after running cron. Even with crawler (and expire and httprl) disabled.
However, as mentioned the cached html pages do not seems to get served. Anonymously viewed pages do not have the 'Page cached by Boost' comment in the source. There is no noticable speed increase. Furthermore the cache file for the page is updated on every visit. Strangely enough the boost status block correctly reports the pages' cache status ('flush page'button also works).
@Philip_Clarke :
Dont know if this is relevant (as the cache seem to get written for my setup) but I am using a multilingual site with path prefixing. Node dirs (both for the one in root as the ones in subdirectories) have 775, language dirs ( en, de etc.) have 755 and the html cache files have 664.
Comment #22
firfin commented@bgm :
- is there still a "notice", and if yes, please copy-paste the full message.
In only get them after running cron it seems. Not as a notice, only in dblog. From admin -> reports -> recent :
- is the notice also logged to watchdog when viewing the page as anonymous? (when the cache is generated)
No errors on cache generation found.
- when logged-in, enable the Boost status block, and see if it mentions a reason why the page is not cached to anonymous users.
All pages visited by anonymous get cached. Non cached pages show the generic 'not cached yet' message.
The pages DO get cached again on every anonymous visit though.
Comment #23
creando sensaciones commentedI had this error message in several page views, just when applying a third argument.
Cloning the view and using it under a different name solved the issue.
Example: a view named 'activities' with three taxonomy term ID contextual filters produced the error when passing the third argument in the url. A new view named 'activty' didn't produced the error.
Deleting the initial view and cloning it back to the original name produced the error again.
Both views used an identical template.
Comment #24
Rosamunda commentedI´ve installed latest dev version, and still get this error.
The webpage source code says "Page cached by Boost", but I haven´t noticed any difference in loading speed (I´ve even checked with Google Page Speed Insight).
I´ve checked the Boost Status Block and it says: Generated: not cached yet (either no one has visited the page recently, or something is preventing the cache from being generated).
Any news on what to do? How to ckeck if Boost is working?
Comment #25
Anonymous (not verified) commentedIf at the bottom of the page you are having "generated by boost..." then it is working, when you are seeing the block, you are logged in. Boost only works for anonymous visitors, if you visit the page and then log in an visit the same page, then the menu will probably change, giving the time.
The thing about boost is that it's the second time that you visit the page that you would see the speed increase as then it doesn't hit the database, so you may want o refresh before running page speed tests, also you should make sure that the page is not expiring quickly. Boost really does increase the page speed dramatically,but that doesn't mean that your site may not be held up by a slow network connection, images not being cached, css not being combined, poor javascript programming in the template, a whole range of issues.
Comment #26
Rosamunda commentedThanks Philip!
Yes, I can see now that Boost is indeed working just fine! :)
Comment #27
Anonymous (not verified) commentedI would suggest that you use firebug for firebox or developer tools in Chrome and examine your website for images and the network tab to see what is slowing it down. Generally you will find that the cache knocks 4~5 seconds off the initial page delivery, and it should help you narrow down the bottle necks, css and js files should be aggregated in the normal boost settings but page displat times can be affected by javascript not being deferred, large image without sizes defined...
Comment #28
vikramy commentedfirfin,
I was facing same issue.
I had configured "Root cache directory" outside webroot. Cache files was created but not served. So when I moved that inside webroot(sites/default/files/*), it worked great. When debug mode is on, still I get that error message. I am using beta2 version.
Notice: Undefined index: args in boost_deliver_html_page()
Comment #29
Anonymous (not verified) commentedYou could move the cache outside of the web root if you had a symbolic link inside the web root pointing to it, otherwise the rewrite rules which are relative to the web root are probably not going to work (though possibly with full paths added).
As for the undefined indexes, httprl can trigger it as can any "no content" page like a redirect or 404 that is not cached, the reason being that their is no content to save as it gets unset or dumped so the boost_deliver_html_page function has nothing passed to it, the function could probably be improved by setting a blank value, except I believe it's one value of an array.
Comment #30
vikramy commentedYes. Thanks.
Question: Is it a security risk if I plan to place cache files at sites/default/files folder?
Comment #31
Anonymous (not verified) commentedNo, only plain text is being served, not connections to the database, no PHP being processed. The only "risk" would be the caching of pages which had user information on them like a shopping cart or data entry form, but the rules are written to exclude all the drupal default pages, turn off if someone logs in and not work on https sections of sites.
Even if someone were to access the pages directly and a form was stored on there then the form would not submit as the submission URL would be in the wrong place and the security filters built into Drupal for unique form submission (CRSF features) would mean that the form would come up as expired.
Because a Boost cache page has no connection to the db, it is less likely to have a security issue than any PHP page.
Comment #32
marcoka commentedi get this error too:
Notice: Undefined index: args in boost_deliver_html_page() (Zeile 1433 von /www/htdocs/w00bbe43/PRODUCT_DISTRI3/sites/all/modules/contrib/boost/boost.module).
i enabled debug and it logs
pretty interesting as its working, generating the files on my local debian, even with this error but not on the webhosters webserver.
i have no permission issues as cache is set to 777
Comment #33
marcoka commentedComment #34
Anonymous (not verified) commentedThat error is a drupal core exiting with no page or item delivered, so it's either a 302 redirect or an ajax/json query with 0 bytes results. Boost doesn't cache zero results and so hands it back to empty_page_empty because it will not write out a zero page from the output buffer. The permissions is a non-issue and to do with whether php-fpm or php-cgi is set up to only write to folders with certain owners or permissions, or it is sometimes run as a differing user to nginx or apache and is a web hosting issue which results in errors in the logs and blank pages sometimes with 500 server error.