I seem to be getting this error in my logs:
PHP Notice: Undefined index: _boost_cache_this in /usr/local/apache2/vhosts/kpbj.com/htdocs/sites/all/modules/boost/boost.module on line 299

I'm running PHP 5.2.9, MySQL 5.0.85, FreeBSD 6.3

Comments

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new1.09 KB
gregarios’s picture

Status: Needs review » Reviewed & tested by the community
mikeytown2’s picture

Status: Reviewed & tested by the community » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

llite’s picture

I still see such error with the latest 1.18 branch. Checked the source code and wondering if it is caused by missing this sentence

&& isset($GLOBALS['_boost_cache_this'])

??

vkareh’s picture

StatusFileSize
new811 bytes

I had the same error when viewing a feed as an anonymous user. I fixed it by adding an isset($GLOBALS['_boost_cache_this']) right before testing whether it's TRUE or not, as llite said.

Edit: the patch above fixes the issue as well.

chadhester’s picture

Thanks for the patch... I still get this error, though:

Notice: Undefined index: _boost_cache_this in .../sites/all/modules/boost/boost.module on line 299

Warning: Cannot modify header information - headers already sent by (output started at .../sites/all/modules/boost/boost.module:299) in .../sites/all/modules/securepages/securepages.module on line 192

tumblingmug’s picture

Exactly the same here like #7, also in combination with securepages.

It happens on one hand if I switch from a boost-cached page to "user/login" where securepages has the order to redirect to https:
Cannot modify header information - headers already sent by (output started at /var/www/sites/all/modules/boost/boost.module:299) in /var/www/sites/all/modules/securepages/securepages.module on line 192

However, this can be solved by putting lines like these into .htaccess right below ### BOOST END ### and thus replace securepages (what is not really convenient):

  RewriteCond %{HTTPS} off
  RewriteCond %{REQUEST_URI} /user/login
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R]

On the other hand: error messages appear as well, if redirection happens reverse by switching from high confidential https stuff to a harmless section of the site and securepages is told to redirect back to http, while the user is still authenticated. I get:

Notice: Undefined index: _boost_cache_this in /var/www/sites/all/modules/boost/boost.module on line 299

Warning: Cannot modify header information - headers already sent by (output started at /var/www/sites/all/modules/boost/boost.module:299) in /var/www/sites/all/modules/securepages/securepages.module on line 192
tumblingmug’s picture

Status: Closed (fixed) » Active
tumblingmug’s picture

Patch of #6 solves this for me! Still have not tested 6.x-1.x-dev - so unsure, if this issue should remain active.

skizzo’s picture

subscribing (patch #6 does not apply cleanly to 6.x-1.18)

brycesenz’s picture

subscribing.

mdorman’s picture

StatusFileSize
new824 bytes

I'm attaching a different approach to patching the issue. I'm array_key_exists('_boost_cache_this', $GLOBALS). The patch works for me on 6.x-1.18.

markwittens’s picture

Had the same problem, #13 seems to do the trick.

bgm’s picture

Status: Active » Fixed

Please test on the dev 6.x-1.x version. This was fixed a long time ago (see #3), but unfortunately there hasn't been a release since. (a 6.x-1.x beta will be released soon)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.