In my subtheme's info file I am adding two scripts
; Optionally add some jquery scripts to your theme.
scripts[] = jquery-browser.js
scripts[] = general.jsBut if a person is anon, $scripts is an empty string.
Am I missing something here?
In my subtheme's info file I am adding two scripts
; Optionally add some jquery scripts to your theme.
scripts[] = jquery-browser.js
scripts[] = general.jsBut if a person is anon, $scripts is an empty string.
Am I missing something here?
Comments
Comment #1
dstolAlso jquery.js and drupal.js aren't included.
Comment #2
valthebaldif $scripts is empty, try to add to phptemplate_preprocess_page(&$vars) the following lines:
drupal_add_js('var a=1', 'inline'); // meaningless js code, to initialize standard js inclusion
$vars['scripts'] = drupal_get_js('header');
Comment #3
RenMan4115 commentedI'm having the same problem with my Zen subtheme.
If I don't include at least one script in my mytheme.info file, then anonymous users don't get any scripts on page loads (not even the default jquery.js and drupal.js).
As soon as I include one script in mytheme.info, then jquery.js and drupal.js load as well. Is this, then, the only way to make sure those defaults are loaded for the anonymous user?
Comment #4
valthebaldI guess so. After second thinking, I dare say this is not a bug. There's no reason to include default scripts if they are the only scripts on page :)
Comment #5
akalata commented