Skip to main content

Drupal 6 Block Cache Mode Patch Module


Drupal 6 has a long-standing bug in the block module (as of 5/10/2011). This bug affects block caching mechanisms. The bug manifests itself if you have block caching enabled.

Once a module's blocks have been registered with the system (in the {blocks} table), the block's caching mode settings are never updated in the {blocks} table, regardless of subsequent cache flushes or other system updates. This is only a problem for modules that change the 'cache' info returned from hook_block op='list' calls.

Uninstalling and re-installing the module won't fix the problem due to another Drupal 6 bug.

More info

This problem impacts any module that changes the caching mode returned in hook_block('info') operation. In particular, the views module allows you to edit a block view's caching mode after creation, but, due to this bug, the changes will never take effect, leading to much head-scratching.

More info

The fix

There are a few core patches available (see Issue 235673, above), but they may not apply cleanly to your Drupal 6 installation; I don't patch core unless there's a critical need. In this case, the patches failed to apply on the sites that needed the fix. So I created a simple custom module that implements the guts of the most recent patch.

Note: You can download the module in the Attachments section, below. Leave a comment if you find this module useful, or, if you have questions about it.

Essential Drupal Modules for Drupal 7

Drupal 7 has been released. As expected, it appears to be a significant improvement over Drupal 6 and earlier versions. Congratulations to the core team for this major milestone!

But what about essential contributed modules? The #D7CX (Drupal 7 Contrib Experience) effort was intended to ensure that Drupal 7 did not suffer the same fate as the Drupal 6 release -- many modules were not available for Drupal 6 well after its release (the problem continues to this day).

In order to make the biggest possible impact, we need as many modules as possible to have full Drupal 7 releases on the day when core Drupal 7 is released. Our failure to accomplish this for Drupal 6 was devastating. So, let's turn our attention toward D7CX - Drupal 7 Contrib Experience.

We are collecting pledges from maintainers to support the D7CX effort. A pledge consists of writing a statement like below at the top of your project page on [...]

Source: (now defunct)

My experience shows that availability of stable contributed modules is crucial to adoption: I delayed migration from Drupal 5 to Drupal 6 on my existing web sites for well over a year, and when rolling out a new web site that would have been perfectly suited to Drupal, I chose to roll out with Drupal 5 due to the availability of fully released and tested contributed modules.

As a former Drupal contrib module developer, I understand the difficulties related to upgrading modules for each major version's new release. I'm just now getting back into Drupal module development, and with the Drupal 7 release now a reality, I wanted to know how successful the #D7CX pledge effor twas. So I started digging around, looking for contributed modules with a full

As of today, 1/9/2011, here are some of my favorite Drupal contributed modules that do not have a full Drupal 7 release available on the project homepage. (Most have alpha, beta, or -dev versions available, and they may be perfectly usable on a production site, though I'd suggest a thorough test first.)

  • Administration Menu
  • Adsense
  • Adsense Injector
  • Amazon
  • Bad Behavior
  • Devel
  • Google Analytics
  • Image API
  • LoginToboggan
  • Mollom
  • Panels
  • PathAuto
  • Token
  • Views
  • XML Sitemaps

So, unless I misunderstand what "a full Drupal 7 release" means, it looks like we have a ways to go. I will see if there is any way I can assist in the effort...

How about you? What modules do you rely on, and are they available for Drupal 7 as a full release? If not, what can you do to help make the Drupal 7 version available soon?

How do I erase or delete an Evercookie?

What's an evercookie?

An evercookie is a persistent cookie that uses numerous clever techniques to avoid full deletion by the user. Think of it as a "super-cookie" that can be used to track your online activities even though you have taken steps to protect yourself, and you think you are protected against tracking.

To make matters worse, evercookies use something known as a local shared object (a Flash variable) to provide cross-browser tracking. This is another great reason to block Flash by default -- if you are a FireFox user, you really should be using FlashBlock, NoScript, or other techniques to avoid auto-loading Flash animations in your browser.

Just in time for the elections: "I'm an anarchist... and I vote" bumper stickers!

Posted in

I found this on -- a funny bumper sticker:

I'm an anarchist -- and I vote bumpersticker

Revert to XP-Style Alt-Tab ('Coolswitch') behavior in Windows 7 and Windows Vista

If you are a longtime Windows user (as I am, I've been using Windows since version 1.03 in 1987), you've probably developed some deeply-ingrained habits.

On of my most oft-used techniques from the old days: Switching between desktop windows using the Alt+Tab key combination, A.K.A. 'Coolswitch'. Windows 7 and Windows Vista have altered this feature, and not for the better, in my opinion.

Wacom Cintiq 21ux -- simply awesome!

The Wacom CINTIQ 21UX (DTK2100) 21-Inch Pen Display is just awesome. I'm thinking of ordering one soon.

Seems like many online vendors are backordered one to two weeks. Is this due to popularity or is there a production issue that's preventing shops from restocking?

Drupal for E-Commerce

Using Drupal for E-Commerce

So, you're using Drupal to run your site. You'd like to sell products to site visitors. What are your options? This page provides an overview of some of the available solutions.

Drupal and Paypal

You can 'roll-your-own' integration, or use the LM_Paypal module.

The LM_Paypal module is not intended to be a full e-commerce solution, but it does provide some types of built-in PayPal payment notifications, and when payment is completed, LM_Paypal module receives and records the notification. It allows for very simple automated donations, subscriptions, and paid advertisements. You should evaluate this module to see if it meets your needs. There are some significant limitations, so be sure to read the issues queue to ensure that the module does what you want it to do.

Drupal and E-Junkie

E-Junkie is a lightweight online shopping cart and fulfillment system. This blurb, taken from their home page, describes the system.

E-junkie provides shopping cart and buy now buttons to let you sell downloads and tangible goods on your website, eBay, MySpace, Google Base, CraigsList and other websites using PayPal Standard, PayPal Pro, Google Checkout, Authorize.Net, TrialPay, ClickBank and 2CheckOut.

For merchants selling downloads, we automate and secure the digital delivery of files and codes. If you are selling tangible goods, we automate the shipping calculation and inventory management. Our shopping cart has a built in sales tax, VAT, packaging and shipping cost calculator.

E-Junkie Drupal Integration

That sounds great, but how do I integrate E-Junkie with Drupal? At present, I have not found any third-party Drupal modules offering E-Junkie and Drupal integration.

There are integration examples and how-to posts floating around on the web, however:

Drupal and Ubercart

Ubercart is an extensible e-commerce system that provides native product and shopping cart management within Drupal. Configuration can be somewhat complicated, but it does offer a complete solution with numerous add-in modules. You should plan for significant configuration, customization, and theming effort if the standard appearance and features are not close to what you want.

Extension modules of varying quality are available, and these may help you implement the features you want–be sure to set up a test site and verify all functionality before "going live".

Web server performance tuning and benchmarking - grab bag

I've been working on web site performance optimizations lately (though you might not believe it when visiting this site...)

I've come across a few useful performance-related resources that I've been using lately:

Module: Disable collapsible fieldset animations in Drupal 5

Drupal 5 and later versions provide an animation when you expand or collapse a collapsible form fieldset.

While this is a nifty effect, it can be annoying to some users, and it can slow you down when viewing a web page over a Remote Desktop session in Windows (I use Remote Desktop a lot at home, and the expand/collapse animation can take seconds to complete depending on network speed–it all adds up).

Drupal 6.x Sub-Theme Development Troubleshooting Checklist

The Drupal Sub-Theme system is a welcome addition to the Drupal system. There are a few gotchas that can trip up the unwary. Here's a quick troubleshooting list to check when you are creating a sub-theme based on an existing Drupal theme.

  1. Disable Drupal's CSS and JavaScript caching in your site's admin settings/performance page:
  2. Be sure to define at least one style sheet in your .info file. Base theme style sheets are not inherited unless you define at least one style sheet for your sub-theme
  3. Avoid Frustration: Some changes won't take effect right away. Rebuild the Drupal theme cache by visiting your site's admin/build/themes page (hit the browser reload button just to be certain!)
  4. White Screen Of Death?: If you override one of the base theme's template files, then later delete it, you may fall victim to the dreaded WSOD, and will be unable to access the site. Solution: the theme cache may need to be cleared.
    • If you can't access your site due to a WSOD, use a SQL query to delete the theme cache entry from the {cache} table: delete from cache where cid like 'theme_registry%'; then reload your site's page. For more information, see Clearing the Theme Cache.
Syndicate content