I'm seeing a caching issue when used with Icon API 7.x-1.0.
Under some circumstances, bootstrap icons just vanish and this is because wrong values get into the icon api cache, as bootstrap_icon_bundles() return an empty array, but I think it is actually an issue with this theme.
To reproduce it:
0. Bootstrap theme enabled, but using some admin theme not bootstrap based.
1. drush cc all
2. Right after that visit the Icons administration page. (Admin / Configuration / Media / Icons).
3. Click save... Glyphicons gone.
I traced it to bootstrap_icon_bundles() returning nothing since it depends on _bootstrap_glyphicons_supported(), just because the current theme (the admin theme, not bootstrap) doesn't support glyphicons - which is right, but the value -no glyphicons- is cached for every other theme -no glyphicons either.
So I think that '_icon_bundles()' hook shouldn't depend on the current theme. As Icon API uses it, it just should only return information about the library, that later can be used or not with other specific themes, but not about the current theme (which is usually the admin theme) supporting it or not.
Patch will follow.
Comment | File | Size | Author |
---|---|---|---|
#5 | bootstrap-icon-bundles-2974394-2.patch | 1.06 KB | Jose Reyero |
#2 | bootstrap-icon-bundles-2974394-1.patch | 1.19 KB | Jose Reyero |
Comments
Comment #2
Jose Reyero CreditAttribution: Jose Reyero as a volunteer commentedThis is a simple patch that just removes _bootstrap_glyphicons_supported() condition from bootstrap_icon_bundles().
Comment #4
markhalliwellPatch has to be relative to the project, not your site.
Comment #5
Jose Reyero CreditAttribution: Jose Reyero as a volunteer commentedFixed patch, relative to the project (against 7.x-3.20 though, hope it still applies)
Comment #7
markhalliwell