Closed (fixed)
Project:
Bootstrap
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2012 at 07:29 UTC
Updated:
26 Dec 2012 at 12:01 UTC
Hi,
First of all: thanks for that great help. It saved me a lot of time.
My problem : I am experencing an error 'Theme key "bootstrap_btn_dropdown" not found' every time I clean up the cache or run cron.
However, this theme function is properly defined in in bootstrap template.php. I can't figure ou where this problem comes from.
Thanks
Laurent
Comments
Comment #1
frankbaele commentedstrange, i'm commiting a small fix that changes the name of the theming functions. I cannot reproduce your error but i think it is caused by the implementation of the original theming functions :
bootstrap_bootstrap_btn_dropdown => now, but there is no need for using the prefix bootstrap, theme_ should be used because this is the first implementation of the function.
theme_bootstrap_btn_dropdown => new name
could you retest with latest dev version
Comment #2
natted commentedHi Frank,
Possibly related to the change from: #1483918: Consolidate preprocess functions and theme implementations into one function
Comment #3
frankbaele commentedanother thing is i noticed that the theme function is not used any more and doesn't work proprely like the other dropdown function
Comment #4
agence web coheractio commentedThanks. Just tested : the issue is still there.
Comment #5
frankbaele commentedComment #6
agence web coheractio commentedI've spotted where the issue comes from but I don't know how to solve it.
I am calling theme('bootstrap_btn_dropdown', ...) from a custom module in to create a user drop down menu. Apparently, Drupal doesn't know the existence of this theme function when calling it from a module and not from template.php.
Strange isn't it ?
Laurnet
Comment #7
frankbaele commentedcould you give me some more info about your project:
sub theme
current version
core versions
major modules installed
...
maybe a log of the error
because i cant reproduce this on my install:
drupal 7.17
devel
views
ds
Comment #8
agence web coheractio commentedIf this may help : theme('bootstrap_btn_dropdown', ...) is called from hook_preprocess_page() within a module and not my bootstrap subtheme.
Comment #9
natted commentedCan you paste the code of your hook_preprocess_page function in the module?
Comment #10
natted commentedOk, the reason you are getting this error is because you are using a non-bootstrap theme as an admin theme.
When you access a page in the admin, the bootstrap theme function is not available.
Comment #11
agence web coheractio commentedMoving the calling hook_preprocess_page function into template.php indeed fixed the bug.
Thanks for the help and the explanation.
Laurent