Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#4 | multiblock-cache-fix.patch | 1.38 KB | Shaney |
Comments
Comment #1
NancyDruI 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.
Comment #2
andrewlevine CreditAttribution: andrewlevine commentedThanks 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?
Comment #3
stefanhapper CreditAttribution: stefanhapper commentedAndrewlevine, I was talking about the core menu blocks created by Drupal.
Comment #4
Shaney CreditAttribution: Shaney commentedI 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.
Comment #5
intrafusionIssue closed as last post 5 years ago