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

frankbaele’s picture

Version: 7.x-3.x-dev » 7.x-2.x-dev
Status: Active » Fixed

strange, 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

natted’s picture

frankbaele’s picture

another thing is i noticed that the theme function is not used any more and doesn't work proprely like the other dropdown function

agence web coheractio’s picture

Thanks. Just tested : the issue is still there.

frankbaele’s picture

Status: Fixed » Active
agence web coheractio’s picture

I'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

frankbaele’s picture

could 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

agence web coheractio’s picture

If this may help : theme('bootstrap_btn_dropdown', ...) is called from hook_preprocess_page() within a module and not my bootstrap subtheme.

natted’s picture

Can you paste the code of your hook_preprocess_page function in the module?

natted’s picture

Status: Active » Fixed

Ok, 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.

agence web coheractio’s picture

Moving the calling hook_preprocess_page function into template.php indeed fixed the bug.

Thanks for the help and the explanation.

Laurent

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.