I'm trying to not use the Bootstrap CDN but I can't get Bootstrap to see local source files. I've done exactly like the documentation says and it's not working.

I've disabled BootstrapCDN under "Appearance". I've downloaded the bootstrap source and unzipped it in my subtheme. I've edited my subtheme.info file and uncommented all the scripts and the settings[bootstrap_cdn] = ''

I've attached screenshots of my info file and of my subtheme folder.

I hope someone can point out somewhere I've gone wrong and help me ;)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hmartens’s picture

I ended up copying the css folder from the Bootstrap distribution into the bootstrap folder in my subtheme and the added the following line in my subtheme.info file:
stylesheets[all][] = bootstrap/css/bootstrap.min.css

That made it work...but this is not in the documentation so technically it should work without me adding in this line.

markhalliwell’s picture

Status: Active » Closed (works as designed)

From Bootstrap sub-theming "how to":

The Bootstrap Library source files are in LESS. You must use either a local LESS preprocessor or install and enable the LESS module - 7.x-3.0-rc1 or higher (see setup).

Scripted response:

Supported code

This project only supports Drupal versions 7.x-3.x and higher.
This project only supports Bootstrap versions 3.0.0 and higher.
This project only supports jQuery versions 1.7 and higher.

Anything that falls outside the scope of this support will be either escalated to the current version or marked as "Closed (won't fix)".

Documentation

There's been some amazing Drupal Community work done around Bootstrap. Many of your questions can be answered in our Bootstrap Documentation section by individuals who have helped further expand Bootstrap's integration with Drupal:
  * Bootstrap related modules
  * Bootstrap sub-theming "how to"
  * Bootstrap theming techniques and tips

If you find documentation in these locations inaccurate or missing, please update it yourself (all logged in users have edit capability).

Creating new issues

PLEASE SEARCH THE ISSUE QUEUE FIRST. DO NOT DUPLICATE EXISTING ISSUES.

It is also strongly recommended you read: How To Solve All Your [Drupal] Problems.

This project's issue queue should only be used when existing/new bugs are found or new feature requests are desired to integrate Bootstrap into Drupal. It should not be used to create issues against the Bootstrap framework, please go to https://github.com/twbs/bootstrap/issues and file them there.

The following support questions should also not be asked here:
  * CSS/Layout (site specific)
  * LESS or SASS syntax/integration
  * JavaScript, Bootstrap or custom (site) plugins
  * Integration with modules that don't work in multiple themes (file the issue with that module).

If you create an issue and it has been marked as "Closed (won't fix)", please visit Drupal StackExchange. It is an amazing resource for asking questions, learning new techniques and overall general support. Please do not blow up this project's issue queue with the equivalent of: "Help me! I don't want to read the multitude of documentation found by a simple Google search."

KimNyholm’s picture

The above fix was helpful for me to get bootstrap cdn disabled. I use Drupal 7.37 and Bootstap 7.x-3.0. I had difficulties using the Method 2 and the LESS compiler described on https://www.drupal.org/node/1978010 Bootstrap sub-theming "how to". In the end it was quite simple.

To disable bootstrap cdn I did the following:
1. Disable BOOTSTRAPCDN in admin/appearance/settings/subtheme/advanced
2. From getbootstrap.com download the compiled distribution and place it in SUBTHEME/bootstrap/dist
3. In SUBTHEME/SUBTHEME.info add the lines
a. stylesheets[all][] = bootstrap/dist/css/bootstrap.min.css
b. scripts[]=bootstrap/dist/js/bootstrap.min.js
4. Flush all caches
Done.

baltazarz3’s picture

Thanks KimNyholm! I was going crazy about cdn still loading. Followed the docs method 1, google it and didn't find your line:

1. Disable BOOTSTRAPCDB in admin/appearance/settings/subtheme/advanced

Regards

klidifia’s picture

There's something missing here. I disable the CDN and use the exact same markup loading the exact same js and css files minified yet I see different visual results.

dess5’s picture

I've used your advice to create the sub theme of startup growth lite theme.It's done but when I check if BootstrapCDN in my sub theme is still working it is. I get stuck on it and I'd like to know if someone is successful to get it worked. Can someone explain me how to disable BootstrapCDN in Appearance/setting/My startup growth lite please

Please help me

zenimagine’s picture

FileSize
219.47 KB

I have the theme Bootstrap CDN 3.3.6 installed on my site and I use the appearance "Journal". How not to use the CDN maintaining the appearance "Journal" ? Thank you

- I download on Bootstrap http://getbootstrap.com/getting-started/#download and I copy the folder in my sub-theme, as you can see on the screenshot.
- I copy the file overrides-journal.min.css to bootstrap theme of css file my subtheme.
- I added a few lines in my file bootstrap_subtheme_front_office.info, see the catch.
- I disabled CDN in subtheme /admin/appearance/settings/bootstrap_subtheme_front_office
- I deleted the cache.

If I erases the line stylesheets[all][] = css/overrides-journal.min.css the theme works correctly but I want to show the appearance of the theme "Journal".

If I add the line stylesheets[all][] = css/overrides-journal.min.css the theme "Journal" is not applied.