We have a menu block that is duplicated using multiblock. When block caching is enabled it doesn't correctly expand menu items and highlights the wrong (cached) active trails.

For the moment we have activated block caching. Is it possible to make multiblock compatible with block cache? Or is this rather an issue related to menus?

CommentFileSizeAuthor
#4 multiblock-cache-fix.patch1.38 KBShaney
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NancyDru’s picture

I know that one issue is that once a block is created (in the database table), Drupal will not go back and update it for things like caching. I beleive this is fixed in D7, but remains broken in D6.

andrewlevine’s picture

Thanks for the report. We'll need more info to get to the bottom of this. AFAIK, caching should work fine with multiblock. It will not work (cached or uncached) if you are saving non-standard settings in a block that is not multiblock enabled (check the README.txt for info on this).

When you say "menu block" do you mean the menu_block module? Or one of the menu blocks created by Drupal core?

stefanhapper’s picture

Andrewlevine, I was talking about the core menu blocks created by Drupal.

Shaney’s picture

Status: Active » Needs review
FileSize
1.38 KB

I have been having a related problem.

A block , when duplicated with multiblock, is always set to have the default cache (1 , which is per role). This causes problems when you are duplicating blocks with non cachable or per user caching. Since this is controled from the 'list' part of hook_block, I don't think making blocks multiblock enabled will fix this.

With the menu example above the cach setting on the original would be -1, or don't cache, because it needs to change on a page by page basis. However the multiblock version gets cached per role so doesn't expand.

I've attached a patch that used the cach value set for the original block when adding a new multiblock, and will update from the original when the multiblock is resaved.

intrafusion’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Issue closed as last post 5 years ago