Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
On a Drupal 7 system that has no visible content for the anonymous contacts but just the login page, the following notice appears:
Notice: Undefined variable: head_title in include() (line 62 of /bootstrap/templates/system/html.tpl.php).
Steps to reproduce
Proposed resolution
On html.tpl.php on line 62, replace:
<title><?php print $head_title; ?></title>
with
<title><?php (isset($head_title) ? print $head_title : print '') ; ?></title>
I've supplied a patch for this (attached)
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
7.x-3.26-html.tpl_.php_.patch | 735 bytes | VangelisP | |
Comments
Comment #2
VangelisP CreditAttribution: VangelisP commentedComment #3
markhalliwellThis variable is automatically (and always) provided by core in template_preprocess_html().
If this variable does not exist, then it means something else is explicitly removing it.
You will need to search for any contrib and custom extensions that may be responsible for doing this.