Upon installing a fresh copy of the latest version of this theme and then creating a sub-theme using the LESS method, I am getting the following notices after clearing cache and theme registry:
Notice: Undefined variable: navbar_classes in include() (line 76 of /xx/sites/all/themes/bootstrap/templates/system/page.tpl.php)
Notice: Undefined variable: container_class in include() (line 77 of /xx/sites/all/themes/bootstrap/templates/system/page.tpl.php)
Notice: Undefined variable: container_class in include() (line 117 of /xx/sites/all/themes/bootstrap/templates/system/page.tpl.php)
Notice: Undefined variable: content_column_class in include() (line 135 of /xx/sites/all/themes/bootstrap/templates/system/page.tpl.php)
Notice: Undefined variable: title in include() (line 51 of /xx/sites/all/themes/bootstrap/templates/block/block.tpl.php)
Notice: Undefined variable: container_class in include() (line 169 of /xx/sites/all/themes/bootstrap/templates/system/page.tpl.php)
Notice: Undefined variable: html_attributes in include() (line 57 of /xx/sites/all/themes/bootstrap/templates/system/html.tpl.php)
Notice: Undefined variable: body_attributes in include() (line 71 of /xx/sites/all/themes/bootstrap/templates/system/html.tpl.php)
Comment | File | Size | Author |
---|---|---|---|
#13 | page_element_tsdn_theme.png | 114 KB | eliosh |
#13 | page_element_admin_theme.png | 97.48 KB | eliosh |
Comments
Comment #2
mamanerd CreditAttribution: mamanerd commentedComment #3
markhalliwellSounds like an APC cache issue, I'm not seeing this issue locally.
Comment #4
mamanerd CreditAttribution: mamanerd commentedI don't have APC installed on my local machine, which is where I'm getting these errors. Any other ideas? I also cannot get a subtheme to work for the life of me now.
Comment #5
markhalliwellCould it be that you have two bootstrap instances installed (e.g.
sites/all/themes/bootstrap
as well as somewhere else)?Comment #6
GreenSkunkSubtheme 2
Just created a Bootstrap CDN Subtheme using bootstrap-7.x-3.x-dev (2015-11-14) with similar errors when adding a page.tpl.php to your subthemes templates folder.
Added page.vars.php with and without some hook_settings changes with the same result.
Subtheme 1
I've another site that uses the Starterkit: CDN bootstrap-7.x-3.x-dev (2015-09-21) doesn't have Notices and DOES NOT override the page.tpl.php but does override block/block--footer.tpl.php
Comment #7
GreenSkunkI've noticed that Subtheme 2 does not have a General tab for the subthemes settings.
Comment #8
GreenSkunkUpdated to Latest dev 2015-11-27 and no issues. Previous Bootstrap folder was missing folders and files
Comment #9
markhalliwellI cannot reproduce this.
Comment #10
core44 CreditAttribution: core44 commentedHaving the same issue here and it's breaking the layout of my subtheme. Strangely, it seems to be only from clearing the cache from within the admin theme (rubik) that breaks it. And you must clear the cache from within subtheme to fix it again. Have tested using seven and bartik as my admin theme with same result.
I've compiled the bootstrap assets myself so not using the CDN at all. I'm also overriding the page vars and page.tpl but have tested with and without these overrides and get the same problem.
Comment #11
elioshThis problem occurs even to me.
I don't use CDN method, and problem occurs as core44 said (cache clear form within the admin theme)
I clear cache via drush, it's ok.
This problem occurs even if i install a new module via drush.
The problem is that it does not include *.vars.php files.
(ps. this problem was occurring to me even before 3.1)
Comment #12
elioshOther updates:
in function bootstrap_theme_registry_alter i added this line
And this is the result (only for page element) after cache clear:
(note: my theme name is "tsdn")
The real strange thing is that the subtheme page.vars.php file is not included.
How can I track down this problem?
Comment #13
elioshOther update:
I created an admin page to read theme_registry:tsdn cache element.
If i cache clear with admin theme, the registry page array element does not contains "includes" key, and subkeys preprocess functions does not contains bootstrap_preprocess_page or tsdn_preprocess_page
If i cache clear with my subtheme, it's ok.
Attached are 2 screenshot done with dsm() output
Comment #14
elioshOther update:
On a clean drupal install, with the same theme, i can't reproduce :-(
But i found something strange:
In the clean install, after cache clear with admin theme, i can't find in cache bin the cid "theme_registry:tsdn"
After refresh of a page with the default theme, the cache element appear, and it's ok.
In the "broken" install, after cache clear with admin theme, i can find the cid in cache bin, and it's unvalid (without includes and without preprocess functions)
So, why the hell in broken install the cache clear saves the theme registry in cache?
Comment #15
elioshI found the problem.
In my case the problem is in function mailsystem_theme_theme_registry_alter which call _theme_load_registry.
I'm investigating...
Comment #16
elioshThis issue, if the others confirm, is a duplicate of this:
https://www.drupal.org/node/2051135
Comment #17
elioshComment #18
core44 CreditAttribution: core44 commentedYES! Excellent investigations skills. And as you pointed out in the mailsystem thread the patch on #13 was the one to fix the problem. Thanks.
Comment #19
markhalliwellComment #20
RoSk0Can some one please provide a reference to which issue this is duplicating. Having same issues and was able to find only this issue in the queue.
Comment #21
markhalliwellSee #16.
Comment #22
wesleymusgrove CreditAttribution: wesleymusgrove commentedConfirming that @eliosh is correct and this is related to #2051135: Mail System breaks theme registry.
See my comment #11 on #2637832: Undefined function bootstrap_setting() for a full explanation of my testing and reproduction procedures.
Comment #23
kumkum29 CreditAttribution: kumkum29 commentedHello,
For me I haven't installed the Mail System module on my site. But I get these warnings when I rescans the template files in views... If I clear all the caches, these warnings go away and the theme isn't broken.
Comment #24
JayKandari#13 strangely solves this problem.
Comment #25
luizsgpetri CreditAttribution: luizsgpetri at CI&T commentedPatch on #16 solved my problem, thanks eliosh!
Comment #26
qqboy CreditAttribution: qqboy commentedi just clear cache and error disappear
Comment #27
timmetj CreditAttribution: timmetj commentedSomebody found another solution for this when you don't use the mail system module? I also get randomly empty webpages using bootstrap subtheme. Then i can't even go info my admin and have to flush the cache through mysql.
Comment #28
Gik000 CreditAttribution: Gik000 commentedI have the same trouble.
I manage to get rid of that for a while using
Anyway the problem appears again for "no reason"
Comment #29
AaronELBorg CreditAttribution: AaronELBorg commentedWeird. I have the same issue as #23.
I'm gonna assume that you're also using a views template file (hence your rescanning of them in the views interface). Perhaps there's some sort of collision happening where both page.tpl.php and your views--view-unformatted--viewname.tpl.php are being called?
Comment #30
Gik000 CreditAttribution: Gik000 as a volunteer commentedThe problem still exists ...
Under certain conditions the bootstrap subtheme doesn't load the variables.
Comment #31
markhalliwellIf you figure out what those conditions are, you'll likely end up fixing your issue.
Comment #32
As If CreditAttribution: As If commentedHad this problem with Bootstrap 7.x-3.26. Mail_system is not installed. The errors began occurring after I created a views field template.
Here's how I fixed it. I have no idea why it worked, but maybe it will give someone a clue...
I created a folder inside /sites/all/themes/SUBTHEME/templates called views
uploaded my views template there and cleared all caches.
this is when the errors began.
I noticed the errors all mentioned files in /sites/all/themes/bootstrap/templates/system
so I made a folder called /sites/all/themes/SUBTHEME/system and copied all of those files into it
WSOD.
Ok, so I removed all files from my new system folder and reloaded the view page.
no errors.
cleared all caches and clicked to another page, then back again.
no errors.
Comment #33
rkent_87 CreditAttribution: rkent_87 commentedAre you saying the solution is just to have an empty /system directory in the subtheme?
Comment #34
As If CreditAttribution: As If commentedI can't explain it either. But for some reason, that's what worked for me.
Comment #35
pinueve CreditAttribution: pinueve commented+1 #32, yes, just add an empty folder called 'system' inside sub-theme directory, clear caches, done. thanks!!!
Comment #36
jeepster CreditAttribution: jeepster commented+1 #32 Thanks!!!