After following the instructions to create a sub theme and followed method 1 to include Bootstrap (downloaded v3.3.1), the theme seems to be working fine, but I cannot seem to override default template files.
Copying page.tpl.php in the /templates directory and modifying it does not change anything. It looks like the original template file is used instead. Clearing the cache, disabling / enabling the theme does not change this.

Environment: php 5.3.28 / Drupal 7.28 / Bootstrap 3.3.1 / JQuery 1.9

Comments

quimic’s picture

Issue summary: View changes
quimic’s picture

Status: Active » Closed (cannot reproduce)

After redoing it all again (creating another sub theme), template files are properly loaded.

PascalAnimateur’s picture

I'm having a similar issue with a field template file not being loaded by my sub-theme (freshly created from the cdn starterkit). I'm using the latest bootstrap -dev (7.x-3.1-beta1+23-dev)

My field is called field_sirul so I tried adding field--field-sirul.tpl.php in my_subtheme/templates (formerly /theme .. but it didn't work then either). I also tried placing it in my_subtheme/ directly, nothing works. I did clear the cache everytime..

Do I have to manually specify my template overrides in a my_subtheme_theme hook ? Where is this documented?

C.T. Studd’s picture

I'm having the same problem!

PascalAnimateur’s picture

@C.T. Studd, my problem turned out to be caused by the semantic_fields module.

Can you provide more details on the templates you're trying to override?

gurtner’s picture

Issue tags: +bootstrap, +caching

I'm having a similar issue and my initial search took me to this page... For me, the issue seems to be that once cache is cleared, navigating to a different page somehow reverts back an old, cached page with bootstrap as the default theme, instead of using my bootstrap sub-theme tpl files that override the parent theme. Anyone had this issue before? I'll post my fix once I figure it out :-)

gurtner’s picture

stephenls’s picture

Posting this for the benefit of others who land here, scratching their heads. Do make sure that your template suggestion uses underscores, not dashes:

  • Correct: $variables['theme_hook_suggestions'][] = "page__" . $variables['node']->type;
  • Incorrect: $variables['theme_hook_suggestions'][] = "page--" . $variables['node']->type;



Not using underscores will completely break things, with theme debug mode being none the wiser.