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)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mamanerd created an issue. See original summary.

mamanerd’s picture

Issue summary: View changes
markhalliwell’s picture

Status: Active » Postponed (maintainer needs more info)

Sounds like an APC cache issue, I'm not seeing this issue locally.

mamanerd’s picture

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

markhalliwell’s picture

Could it be that you have two bootstrap instances installed (e.g. sites/all/themes/bootstrap as well as somewhere else)?

GreenSkunk’s picture

Subtheme 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.

    Notice: Undefined variable: container_class in include() (line 77 of /public_html/sites/all/themes/aimhigh/templates/system/page.tpl.php).
    Notice: Undefined variable: container_class in include() (line 117 of /public_html/sites/all/themes/aimhigh/templates/system/page.tpl.php).
    Notice: Undefined variable: container_class in include() (line 169 of /public_html/sites/all/themes/aimhigh/templates/system/page.tpl.php).

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

GreenSkunk’s picture

I've noticed that Subtheme 2 does not have a General tab for the subthemes settings.

GreenSkunk’s picture

Updated to Latest dev 2015-11-27 and no issues. Previous Bootstrap folder was missing folders and files

markhalliwell’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I cannot reproduce this.

core44’s picture

Having 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.

    Notice: Undefined variable: content_column_class in include() (line 97 of /Applications/MAMP/htdocs/dev/base01/sites/all/themes/roots/templates/system/page.tpl.php).
    Notice: Undefined variable: html_attributes in include() (line 57 of /Applications/MAMP/htdocs/dev/base01/sites/all/themes/bootstrap/templates/system/html.tpl.php).
    Notice: Undefined variable: body_attributes in include() (line 71 of /Applications/MAMP/htdocs/dev/base01/sites/all/themes/bootstrap/templates/system/html.tpl.php).

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.

eliosh’s picture

This 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)

eliosh’s picture

Other updates:
in function bootstrap_theme_registry_alter i added this line

watchdog("bs", "bs_theme_registry_alter registry: !t", array("!t" => print_r($registry, true)));

And this is the result (only for page element) after cache clear:
(note: my theme name is "tsdn")


    [page] => Array
        (
            [template] => page
            [path] => sites/default/themes/tsdn/templates/system
            [type] => theme
            [theme path] => sites/default/themes/tsdn
            [render element] => page
            [preprocess functions] => Array
                (
                    [0] => template_preprocess
                    [1] => template_preprocess_page
                    [2] => context_preprocess_page
                    [3] => advagg_preprocess_page
                    [4] => contextual_preprocess
                    [5] => context_layouts_preprocess_page
                    [6] => views_bulk_operations_preprocess_page
                    [7] => views_preprocess_page
                    [8] => entity_translation_preprocess_page
                    [9] => bootstrap_preprocess_page
                    [10] => tsdn_preprocess_page
                )

            [process functions] => Array
                (
                    [0] => template_process
                    [1] => template_process_page
                    [2] => ctools_process
                    [3] => title_process_page
                    [4] => bootstrap_process_page
                    [5] => tsdn_process_page
                )

            [includes] => Array
                (
                    [0] => sites/all/themes/bootstrap/templates/system/page.vars.php
                    [1] => sites/default/themes/tsdn/templates/system/page.vars.php
                )

        )

The real strange thing is that the subtheme page.vars.php file is not included.
How can I track down this problem?

eliosh’s picture

Status: Closed (cannot reproduce) » Active
FileSize
97.48 KB
114 KB

Other 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

eliosh’s picture

Other 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?

eliosh’s picture

I found the problem.

In my case the problem is in function mailsystem_theme_theme_registry_alter which call _theme_load_registry.

I'm investigating...

eliosh’s picture

This issue, if the others confirm, is a duplicate of this:
https://www.drupal.org/node/2051135

eliosh’s picture

core44’s picture

YES! Excellent investigations skills. And as you pointed out in the mailsystem thread the patch on #13 was the one to fix the problem. Thanks.

markhalliwell’s picture

Status: Active » Closed (duplicate)
RoSk0’s picture

Version: 7.x-3.1 » 7.x-3.4
Status: Closed (duplicate) » Active

Can 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.

markhalliwell’s picture

Version: 7.x-3.4 » 7.x-3.1
Status: Active » Closed (duplicate)
Related issues: +#2051135: Mail System breaks theme registry

See #16.

wesleymusgrove’s picture

Confirming 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.

kumkum29’s picture

Hello,

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.

JayKandari’s picture

#13 strangely solves this problem.

luizsgpetri’s picture

Patch on #16 solved my problem, thanks eliosh!

qqboy’s picture

i just clear cache and error disappear

timmetj’s picture

Somebody 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.

Gik000’s picture

I have the same trouble.
I manage to get rid of that for a while using

drush dl bootstrap -y

Anyway the problem appears again for "no reason"

AaronELBorg’s picture

Weird. I have the same issue as #23.

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.

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?

Gik000’s picture

The problem still exists ...
Under certain conditions the bootstrap subtheme doesn't load the variables.

markhalliwell’s picture

Under certain conditions...

If you figure out what those conditions are, you'll likely end up fixing your issue.

As If’s picture

Had 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.

rkent_87’s picture

Are you saying the solution is just to have an empty /system directory in the subtheme?

As If’s picture

I can't explain it either. But for some reason, that's what worked for me.

pinueve’s picture

+1 #32, yes, just add an empty folder called 'system' inside sub-theme directory, clear caches, done. thanks!!!

jeepster’s picture

+1 #32 Thanks!!!