Without the block module enabled, I was able to enable an Adaptive Theme subtheme, which gave me a white screen of death when visiting the main site. Php logs showed "Fatal error: Call to undefined function block_get_blocks_by_region() in template.process.inc on line 151".

Comments

Jeff Burnz’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Assigned: Unassigned » Jeff Burnz

Good point, I should remove the dependency.

rob.vangalen’s picture

Component: Code » CSS/HTML

I have the same problem.
Can someone help me out?
I don't know how to "remove the dependency"

Jeff Burnz’s picture

Component: CSS/HTML » PHP Code
    $text = t('Main menu');
    if (module_exists('block')) {
      $text = block_get_blocks_by_region('menu_bar') ? t('Navigation') : t('Main menu');
    }

I forgot about this, will fix asap.

rob.vangalen’s picture

This seems to resolve the problem.
Thank you verry much.
It also remember me to make backups :)

Jeff Burnz’s picture

Its in the theme now but not committed, I need to do some more stuff before making more commits to dev versions. Cheers for testing, much appreciated.

mleke’s picture

Hi, I am sorry I am VERY new to this. I am having the same issue but I am not sure how to fix it. Do I put the below code in my php file? If so where do I put it? I have tried that but I am still getting the white fatal error screen. It won't let me do ANYTHING on my site.

$text = t('Main menu');
if (module_exists('block')) {
$text = block_get_blocks_by_region('menu_bar') ? t('Navigation') : t('Main menu');
}

Thank you, thank you!

Jeff Burnz’s picture

It goes in template.process.inc around line 177, replace this line:

$text = block_get_blocks_by_region('menu_bar') ? t('Navigation') : t('Main menu');

With the above code.

mleke’s picture

Thank you!!!!

Jeff Burnz’s picture

Component: PHP Code » CSS/HTML
Status: Active » Closed (fixed)

Fixed in dev.