Hi All,

Thanks for the module as it really helps in creating different instances of a block with different configuration parameters. But there is an issue or bug which i found with the the cache block, if we enabled the "cache blocks" setting under performance then the data is not rendering properly on second page load but if we cleared cache manually then it renders the data. Does it means multiblock is not compatible with block cache, is there any patch is available to fix this issue?.

Any help would be highly appreciated.

Thanks.

Comments

abhishek sawant’s picture

Assigned: abhishek sawant » Unassigned
mlsamuelson’s picture

Status: Active » Needs review
StatusFileSize
new1.46 KB

There's a patch for the D6 version over at https://drupal.org/node/717102.

I've updated it for Drupal 7. Attached.

robv’s picture

The posted patch above is problematic for my site as we have over a hundred multiblock entries.

My bandaid-fix that hooks block_info_alter. On cache update the block cache status for multiblock entries should automatically be corrected.

<?php
	/* fix multiblock block cache compatibility issues */
	function MODULE_NAME_block_info_alter(&$blocks, $theme, $code_blocks) {
		foreach($blocks['multiblock'] as $_key => &$_block) {
			$_data = db_query('SELECT module, orig_delta FROM {multiblock} WHERE delta = :delta', array(
					':delta' => $_block['delta'],
				)
			)->fetchAssoc();
			
			$_info = module_invoke($_data['module'], 'block_info');
			$_block['cache'] = $_info[$_data['orig_delta']]['cache'];
		}
	}
?>
jibus’s picture

#2, resolves the issue, but needs to be updated

jibus’s picture

StatusFileSize
new1.3 KB

Updated patch from #2

  • intrafusion committed 26eca98 on 7.x-1.x authored by Jibus
    Issue #2185235 by Jibus, mlsamuelson: Multiblock with block cache
    
intrafusion’s picture

Status: Needs review » Fixed

This patch has been applied and a new release has been rolled

  • intrafusion committed 26eca98 on 8.x-1.x authored by Jibus
    Issue #2185235 by Jibus, mlsamuelson: Multiblock with block cache
    

Status: Fixed » Closed (fixed)

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