Meaning of Error: Cannot redeclare bootstrap_preprocess_region() I'm setting up a Drupal Bootstrap subtheme, and ran into this fatal error when trying to clear my cache. Something seemed to want to redeclare a bootstrap preprocess function:


  Error: Cannot redeclare bootstrap_preprocess_region()


This caused the whole site to go down and Drush to fail any time I tried to clear or rebuild the cache.

Why is this happening?
This was happening because I'd copied .func.php files from the templates folder of the Bootstrap parent theme into my base theme alongside .tpl.php files. Bootstrap is relatively unusual in that it has files in the templates folder alongside tpl files that will break the site if they're treated like standard theme tpl files.

While the .tpl.php files are to be copied as normal, to override the contents of the other files, you are expected to copy their appropriate contents into your subtheme's template.php file or into a new .func.php file, and substitute your subtheme name for the bootstrap part of the function name.

There's some more information on the theme registry docs page.