Drupal 7: Views block in custom region rendered outside of page.tpl

218 views Asked by At

I have custom regions rendered inside of the node.tpl.php file which work as expected, but results in a php error when a block created by the views module is placed in them.

 [:error] [pid 2563] [client 127.0.0.1:35606] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /filepath/sites/all/modules/devel_themer/devel_themer.module on line 333

Other blocks all work fine the regions and the views blocks work fine in all regions called by page.tpl.php. The error only occurs when the two are put together. There are no other log messages and the page just returns a blank screen so I'm not quite sure what the problem is or how to go about fixing it. I'm using the code below in template.php to make the region available outside of page.tpl.php

function smark_design_theme_preprocess(&$variables) {
  if (block_get_blocks_by_region('region_name')) {
    $variables['region_name'] = block_get_blocks_by_region('region_name');
  } else { $variables['region_name'] = FALSE; }      
}

And this to call the region in node.tpl.php

<?php if ($region_name): ?>     
  <div id="region-name">
    <?php print render($region_name); ?>
  </div>
<?php endif; ?>
0

There are 0 answers