Updated: Comment #21
Problem/Motivation
Bootstrap_carousel module uses hook_requirements to check if bootstrap library exists. The problem is that library might not exist if bootstrap is served via CDN or from theme's subdir (common case if using Boostrap base theme).
This renders annoying false-positive warning in drupal status report The Bootstrap library could not be found.
Proposed resolution
Ignore bootstrap library requirement if bootstrap base theme is installed and active. This can be done with list_themes function.
Original report by JustinID
I have a really annoying issue with my subtheme of Bootstrap. I'm developing a subtheme based on Bootstrap and I'm using the second method (CDN). The subtheme works fine, but I keep getting this error in my status report.
Everything works fine, but I just want to get rid of this error in my report. I tried to add the bootstrap library in the libraries folder and also in the subtheme folder itself, but that doesn't change anything. I hope someone knows a simple solution, whether it's a stupid mistake of myself.
Comment | File | Size | Author |
---|---|---|---|
#45 | evidence_03.png | 118.34 KB | emartoni |
#45 | evidence_02.png | 127.54 KB | emartoni |
#45 | evidence_01.png | 119 KB | emartoni |
#42 | bootstrap_carousel-2047059-42.patch | 2.32 KB | leotorati |
error.png | 24.2 KB | JustinID |
Comments
Comment #1
markhalliwellPretty sure this is because of the Bootstrap API module. Themes cannot provide status requirements, only modules.
Marking this as closed though. Since you're using the theme's CDN, you should probably just disable/remove the extra module.
Comment #2
madaerodog CreditAttribution: madaerodog commentedIn fact, it shows this without the Module activated, with the module activated I get another error on top of that :
Bootstrap - Library
You need to download the bootstrap js library from github. please read the documentation. Missing: bootstrap-affix, bootstrap-alert, bootstrap-button, bootstrap-carousel, bootstrap-dropdown, bootstrap-popover, bootstrap-scrollspy, bootstrap-tab, bootstrap-tooltip, bootstrap-typeahead, bootstrap-modal, bootstrap-collapse, bootstrap-transition
Comment #3
Seal-World CreditAttribution: Seal-World commentedam having the same problem
Comment #4
Blackice2999 CreditAttribution: Blackice2999 commentedHi,
currently the theme dont use anything of this module so you dont need them for the theme.
If you want to use it for own development (using of modal dialogs or popover field support) than you are right here. in this case please explain exactly where your files lives.
Comment #5
markhalliwell@madaerodog, then just install the module if you're not using it. This issue, as @Blackice2999 stated, isn't necessary with the Bootstrap base theme. It is for providing an API that ties the Bootstrap framework in manually.
Comment #6
JustinID CreditAttribution: JustinID commentedThere is no Bootstap API module installed by the way. I tried so many things, but the error remains. Everything works perfectly, but it's just annoying that's all.
Comment #7
markhalliwell@JustinID, I don't know what to tell you. The Bootstrap base theme does not implement any hook_requirements() (which is what is used to create entries on the status report page).
Comment #8
Blackice2999 CreditAttribution: Blackice2999 commentedHi Justin,
are you 100% sure that you dont have sites/all/modules/bootstrap_api module installed ?
Comment #9
dadderley CreditAttribution: dadderley commentedI am having the same problem,
I disabled Bootstrap Carousel 7.x-1.0-rc1 and the problem went away,
Comment #10
JustinID CreditAttribution: JustinID commented@Blackice2999
100% sure.
@dougzilla
I use Bootstrap Carousel too (7.x-1.0-rc5), but I can't disable it (probably because I have content with this type).
Comment #11
dadderley CreditAttribution: dadderley commented@JustinID
That seems to be where the problem lies.
Comment #12
JustinID CreditAttribution: JustinID commentedSo can we classify this as a bug in combination with Bootstrap Carousel?
Comment #13
Blackice2999 CreditAttribution: Blackice2999 commentedHi,
not really. But it can be a Bootstrap Carousel issue so i change the project to it and the maintainer can react on this.
Comment #14
JustinID CreditAttribution: JustinID commentedThanks!
Comment #15
ambientdrup CreditAttribution: ambientdrup commentedHaving the same issue. Any updates on this?
-Trevor
Comment #16
cliff98109 CreditAttribution: cliff98109 commentedI'm also seeing this, apparently after I installed bootstrap carousel.
Comment #17
hj-b CreditAttribution: hj-b commentedSame problem here. I'm using the Bootstrap Carousel module in combination with Nodeblock, works great only this error is a bit anoying. Trying to find the key of this problem.
Comment #18
hj-b CreditAttribution: hj-b commentedFound the key of this issue.
On line 41 of the bootstrap_carousel.install the function bootstrap_carousel_requirements() checks if the bootstrap library is installed.
Because I use BootstrapCDN to serve the Bootstrap framework files I don't need this library so I commented this function to disable the check for the Bootstrap library. This solves the problem for me.
Comment #19
mazzen CreditAttribution: mazzen commentedUpdate JQuery to (at least) 1.8 with the "jQuery Update" module.
Best,
Comment #20
duntuk CreditAttribution: duntuk commented@mazzen, jquery_update has nothing to do with this issue.
If you install the Bootstrap theme, by default it pulls all boostrap files from their CDN. Or it allows you to put the bootstrap libraries inside your custom theme...
What this module does is try to pull bootstrap from /libraries .
Not sure what would happen if one was to put bootstrap libraries in their theme and in /libraries, but probably wouldn't be good to include 2x.
Anyhow...
Eliminating the libraries check is the solution, as noted in #18.
As a work around, there should be an additional check in bootstrap_carousel.install, (maybe in the form of a checkbox) asking if user has the bootstrap libraries installed in their theme--if yes, error goes away, and module installs.
Comment #21
SiliconMind CreditAttribution: SiliconMind commentedHaving the same issue but it seems that the issue was assigned to the wrong project. Bootstrap Carousel is a sandbox project whereas the issue is caused by the Bootstrap_Carousel module (note the underscore).
Bootstrap_carousel module uses hook_requirements to check if bootstrap library exists. The problem is that library might not exist if bootstrap is served via CDN or from theme's subdir (common case if using Boostrap base theme).
Proposed solution is to ignore bootstrap library requirement if bootstrap base theme is installed and active. This can be done with list_themes function.
Comment #22
markhalliwellWell that is certainly confusing. Glad that's sorted out.
What's also confusing is that the "requirement" implies that it pertains to the bootstrap theme rather than this specific module. I think that is partially why this message was so hard to track down (especially if you don't use this module, like me).
The message should be updated to reflect that the requirement is for this specific module as well (as any module should) as well as being downgraded from an "error" to a "warning".
I would also argue that this is a major issue. For certain services that check the status page of drupal installs, this can certainly cause hiccups in deployment when the "error" is actually not true or not true for this particular site (because they chose a different way to implement bootstrap). Regardless, this module makes many assumptions that it shouldn't (no disrespect to the maintainers, just pointing out a fact).
Comment #23
charlya CreditAttribution: charlya commentedYou must download bootstrap 2.3.2 at http://getbootstrap.com/2.3.2/ then put this files in sites/all/libraries/bootstrap.
Because the file say:
'file' => 'js/bootstrap.js',
In Bootstrap 3 this path does not exist.
Comment #24
mattyoung CreditAttribution: mattyoung commentedI just ran into the same Status Report claiming "bootstrap" library not installed.
I had read somewhere else to name the directory twitter_bootscrap, I just renamed it to bootstrap and the problem went away.
This requirement error comes from bootstrap_carousel module
Comment #25
jayxdev CreditAttribution: jayxdev commentedHi,
I fixed this issue like this.
On the boostrap-business theme directory, you just have to copy the directory bootstrap/ in sites/all/libraries/ ,clear the cache and check on the dashbord administration, everything should be OK.
Comment #26
jayxdev CreditAttribution: jayxdev commentedFixed
Comment #27
markhalliwellYes, that will fix your local site issue. It doesn't change that this issue is about the confusion around where the message comes from. It must be fixed in this module's code.
Comment #28
Beezer75 CreditAttribution: Beezer75 commentedFollowing this. I'm running the bootstrap theme and I want to use the bootstrap carousel module, the problem is that each wants to look for bootstrap in different places. The problem I run into is that loading it in the /libraries overrides the theme files and then my sub-theme stops working. I see the solution is to use the list_themes function, can anyone offer a little more specific detail on doing so?
BTW, #18 works, but I'd prefer a solution that didn't require hacking the module.
Comment #29
markhalliwell@chris@bohnsackdesign.com, see https://www.drupal.org/project/bootstrap_ux
Comment #30
DarkteK CreditAttribution: DarkteK commented#23 helped me :D
Comment #31
PROMESI created a patch for the 'bootstrap_business' theme (using the 3.2.0 cdn). Since for each theme (and version) there will be another way to detect the presence of the bootstrap library, the code can easily extended.
The changed code is:
Comment #32
OlenaY CreditAttribution: OlenaY commentedHi to all
I installed this module in error. I do not need for it.
But. I can not to remove it. Because it "Required by: Drupal (Field type(s) in use - see Field list)".
There are all fields in the field list. I did not create any field with Bootstrap Carousel Module using.
Just installed it.
How I can to remove this module?
Comment #33
sami.etogo CreditAttribution: sami.etogo commented#18 working for me, thanks!
Comment #34
gabrielmachadosantos CreditAttribution: gabrielmachadosantos at CI&T for Pfizer, Inc. commentedCreated a patch to search on default theme if it already has the bootstrap library. Tested with bootstrap and bootstrap_business themes and in order to load the bootstrap.js the theme must be set as default not just enabled. As soon as someone review/test I will release on 7.x-1.2.
Comment #35
bitspitosyflautas CreditAttribution: bitspitosyflautas commentedthanks for patch in #34! i added extra case for bootstrap child themes:
Comment #36
leotorati CreditAttribution: leotorati at CI&T commentedComment #37
leotorati CreditAttribution: leotorati at CI&T commentedComment #38
leotorati CreditAttribution: leotorati at CI&T commentedAccording comment #35, if we use a subtheme from bootstrap we will have the issue, but the code in the same comment fix it. I created a patch adding that code.
Comment #39
leotorati CreditAttribution: leotorati at CI&T commentedComment #40
leotorati CreditAttribution: leotorati at CI&T commentedComment #41
atoledo@ciandt.com CreditAttribution: atoledo@ciandt.com at CI&T commentedThe current verification is checking if the base_theme has a settings with bootstrap.js, but it will not load it.
We should change the approach to:
Comment #42
leotorati CreditAttribution: leotorati at CI&T commentedI agree with approach suggested by atoledo in comment #41, so, I changed the code for hook_requirements to reflect that.
Comment #43
nimzie CreditAttribution: nimzie commentedsubscribing - having this issue as well. Is this patch working / safe / recommended?
Comment #44
kirand CreditAttribution: kirand commented#23 fixed the issue.
Comment #45
emartoni CreditAttribution: emartoni at CI&T commented#42 works fine to mee!
Thanks @leotorati.
Attached 3 images:
1) No bootstrap theme installed and report shows error.
2) Bootstrap theme installed and enabled.
3) Bootstrap theme with no error message on report.
Comment #46
emartoni CreditAttribution: emartoni at CI&T commented