When I download TAO change the tao.info in mytheme.info upload and enable/set default i get an PHP notice:
Notice: Undefined variable: primary_local_tasks in include() (line 44 of /home/gervoyse/domains/gervoyse.be/public_html/sites/all/themes/dothraki/templates/page.tpl.php).
Notice: Undefined variable: secondary_local_tasks in include() (line 45 of /home/gervoyse/domains/gervoyse.be/public_html/sites/all/themes/dothraki/templates/page.tpl.php).
i didn't installed extra modules or other things. its a fresh drupal installation.
in the page.tpl.php on line 44 en 45 I have this:
if ($primary_local_tasks):
print render($primary_local_tasks)
endif;
if ($secondary_local_tasks):
print render($secondary_local_tasks)
<?php endif
any suggestions ? or should i just change my php.ini and hide the notice.
thx in advance!!
Comment | File | Size | Author |
---|---|---|---|
#4 | 1287286-tao-check-if-variables-exist-in-page-tpl-php.patch | 1.55 KB | barraponto |
#2 | Notice_Undefined_Variable-1287286-2.patch | 1.08 KB | Coop920 |
Comments
Comment #1
tinny CreditAttribution: tinny commentedI have the same error except my path error says:
/sites/all/themes/tao/templates/page.tpl.php
Comment #2
Coop920 CreditAttribution: Coop920 commentedI went ahead and applied an isset function around $primary_local_tasks and $secondary_local_tasks to check for the variables and this has cleared out the error.
Comment #3
barraponto CreditAttribution: barraponto commentedI added a check to actions since it seems prone to the same problem. Changed from isset to !empty since we do care that it is not empty (see http://kunststube.net/isset/ for more on this).
Comment #4
barraponto CreditAttribution: barraponto commentedComment #5
funana CreditAttribution: funana commented#4 seems to solve the problem.
Comment #6
barraponto CreditAttribution: barraponto commented@funana if it works for you, change status to
reviewed and tested by the community
Comment #7
funana CreditAttribution: funana commentedComment #8
haydeniv CreditAttribution: haydeniv commentedPlease provide steps to reproduce as I do not see this happening in the current dev version. If you are installing a sub theme you need to make sure that Tao is downloaded to your themes folder prior to enabling your theme.