A feature request instead of a bug.

I installed boost on several websites and get the following error message on every single one of them.

The block Boost: Pages cache status was assigned to the invalid region right and has been disabled.
The block Boost: Pages cache configuration was assigned to the invalid region right and has been disabled.
The block Boost: AJAX core statistics was assigned to the invalid region right and has been disabled.

Boost is setting the block region by default to the right region for its three blocks. When the theme doesn't have a right region the above error message appears after every single cron run. The module shouldn't assume that there is going to be a right region in the theme.

This may have to do with this issue http://drupal.org/node/1172560 and may ultimately be a issue with Drupal 6.22, but there's just no reason the define a default region.

Solution

The easy fix is to change the default region from right to none in the boost.module on lines 907, 913 and 919 or remove the region option all together and let the user place the blocks in a region that actually exists.

--- a/sites/all/modules/boost/boost.module
+++ b/sites/all/modules/boost/boost.module
@@ -904,19 +904,19 @@
       return array(
         'status' => array(
           'info'   => t('Boost: Pages cache status'),
-          'region' => 'right',
+          'region' => 'none',
           'weight' => 10,
           'cache'  => BLOCK_NO_CACHE,
         ),
         'config' => array(
           'info'   => t('Boost: Pages cache configuration'),
-          'region' => 'right',
+          'region' => 'none',
           'weight' => 10,
           'cache'  => BLOCK_NO_CACHE,
         ),
         'stats' => array(
           'info'   => t('Boost: AJAX core statistics'),
-          'region' => 'right',
+          'region' => 'none',
           'weight' => 10,
           'cache'  => BLOCK_NO_CACHE,
         ),
CommentFileSizeAuthor
#1 boost-1267072.patch796 bytesenergee

Comments

energee’s picture

StatusFileSize
new796 bytes

The block Boost: Pages cache status was assigned to the invalid region none and has been disabled.
The block Boost: Pages cache configuration was assigned to the invalid region none and has been disabled.
The block Boost: AJAX core statistics was assigned to the invalid region none and has been disabled.

Use this.

jsibley’s picture

Will the patch make it into an update of the boost module for Drupal 6 anytime soon?

Thanks.

todea’s picture

Are these blocks necessary for boost to function correctly? If the blocks are being disabled are there any negative effects beyond errors in the log?

jsibley’s picture

Also, this is probably obvious to most people, but there is an option to display errors to the screen, log, or both. I had set errors to display to both for my development site and forgot to reset to log-only for production. One more thing to remember in moving from development to production.

energee’s picture

If you are logged in as uid 1, errors will always display onscreen.

Also, the patch I posted (A correction of the inital patch) is not necessary for boost to function, only to correct the error with placement of blocks.

bgm’s picture

Status: Active » Fixed

This has already been fixed in the 6.x-1.x branch. We are really overdue for a release. Please test the latest 6.x-1.x snapshots.

jsibley’s picture

I finally updated to the latest Drupal 6 deb version and am still getting the invalid region right message. Wouldn't it be possible to create a version of the module that doesn't depend on specific regions being part of a theme? Thanks.

Status: Fixed » Closed (fixed)

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

bjsomers’s picture

+1

bjsomers’s picture

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

Status: Active » Fixed

Are you running the "dev" snapshot? This has been fixed some time ago..

Worst case, run this:

UPDATE blocks SET region=0, custom=0 WHERE module='boost'

For reference, the code where regions used to be defined explicitly:

/**
 * Implementation of hook_block().
 */
function boost_block($op = 'list', $delta = 0, $edit = array()) {
  global $user;

  switch ($op) {
    case 'list':
      return array(
        'status' => array(
          'info'   => t('Boost: Pages cache status'),
          'weight' => 10,
          'cache'  => BLOCK_NO_CACHE,
        ),
        'config' => array(
          'info'   => t('Boost: Pages cache configuration'),
          'weight' => 10,
          'cache'  => BLOCK_NO_CACHE,
        ),
        'stats' => array(
          'info'   => t('Boost: AJAX core statistics'),
          'weight' => 10,
          'cache'  => BLOCK_NO_CACHE,
        ),
        'relationship' => array(
          'info'   => t('Boost: Expiration Relationship'),
          'weight' => 10,
          'cache'  => BLOCK_NO_CACHE,
        ),
      );
      break;
[...]

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

A feature request instead of a bug.