My setup:
sites/all/themes/bootstrap/ - original bootstrap theme.
sites/all/themes/mybasetheme/ - intermediate base theme, based on bootstrap
sites/all/themes/mybasetheme/bootstrap/ - bootstrap css and assets
sites/all/themes/mytheme/ - site-specific theme, based on mybasetheme.

Problem: Bootstrap icons do not work.

Why?

function bootstrap_icon_bundles() {
  $theme = variable_get('theme_default', $GLOBALS['theme']);
  $cdn = theme_get_setting('bootstrap_cdn', $theme);
  $bundles = array();
  if ($cdn || (!$cdn && file_exists(drupal_get_path('theme', $theme) . '/bootstrap/fonts/glyphicons-halflings-regular.ttf'))) {
    ...

So.. it only works if the /bootstrap/ is in the site's default theme, but not if it is in any base theme of the default theme.

Comments

donquixote’s picture

Title: Consider base themes bootstrap_icon_bundles() » Consider base themes in bootstrap_icon_bundles()

(fix title)

markhalliwell’s picture

Title: Consider base themes in bootstrap_icon_bundles() » Iterated through all active (base) themes in _bootstrap_glyphicons_supported()
Category: Task » Bug report
Related issues: +#2206725: Create _bootstrap_glyphicons_supported() helper function, +#2223885: Detect standalone hook_[pre]process_THEME_HOOK__SUGGESTION implementations

Are you sure you have the latest dev? This code snippet is not current 7.x-3.x-dev, it uses _bootstrap_glyphicons_supported() now. See related issues.

That being said, I am pretty positive that it still doesn't catch the intermediate "base" sub-theme. There is also new helper function, _bootstrap_get_base_themes() that should probably be used.

markhalliwell’s picture

Title: Iterated through all active (base) themes in _bootstrap_glyphicons_supported() » Iterate through all active (base) themes in _bootstrap_glyphicons_supported()
donquixote’s picture

Are you sure you have the latest dev?

I am sure I do not :)
I just wanted to report this and give it into competent hands :) You probably have a much better idea what needs to be done.

  • Commit ca7d4b0 on 7.x-3.x by Mark Carver:
    Issue #2224819 by Mark Carver | donquixote: Iterate through all active (...
markhalliwell’s picture

Version: 7.x-3.x-dev » 8.x-3.x-dev
Assigned: Unassigned » ryan.armstrong
Status: Active » Needs review

  • Commit ca7d4b0 on 7.x-3.x, 8.x-3.x by Mark Carver:
    Issue #2224819 by Mark Carver | donquixote: Iterate through all active (...

  • Mark Carver committed ca7d4b0 on 8.x-3.x.x
    Issue #2224819 by Mark Carver | donquixote: Iterate through all active (...
markhalliwell’s picture

Version: 8.x-3.x-dev » 7.x-3.x-dev
Assigned: ryan.armstrong » Unassigned
Status: Needs review » Closed (fixed)

I'm just moving this back to 7.x. If this needs re-evaluation in 8.x, create a new issue.