Drupal从6个升级到7个未定义的变量

时间:2012-12-19 03:02:55

标签: drupal drupal-7

当我按照http://www.siteground.com/tutorials/drupal-tutorial/drupal_upgrade.htm的说明尝试运行update.php时,会出现一长串错误。

  

注意:未定义的变量:头部在include()中(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php的第8行)。       注意:未定义的变量:include()中的head_title(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php的第9行)。       注意:未定义的变量:include()中的样式(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php的第10行)。       注意:未定义的变量:include()中的脚本(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php的第11行)。       注意:未定义的变量:在include()中左侧(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php的第16行)。       注意:未定义的变量:在include()中(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php的第16行)。       注意:未定义的变量:include()中的标题(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php第19行)。       注意:未定义的变量:在include()中左侧(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php第60行)。       注意:未定义的变量:include()中的任务(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php第69行)。       注意:未定义的变量:include()中的tabs2(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php第73行)。       注意:未定义的变量:include()中的帮助(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php第75行)。       注意:未定义的变量:include()中的内容(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php第77行)。       注意:未定义的变量:include()中的页脚(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php第80行)。       注意:未定义的变量:include()中的footer_message(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php第80行)。       注意:未定义变量:在include()中右侧(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php第83行)。       注意:未定义的变量:include()中的闭包(/home/content/66/9070466/html/ehapsa/ehapsa/sites/all/themes/garlandcustom/page.tpl.php第94行)。

我试图在当前网站的子目录下升级。

1 个答案:

答案 0 :(得分:1)

这是解决方案。 必须在page.tpl.php中以不同方式打印自定义区域

在Drupal 6中,当你想要打印一个刚制作的区域时,你只需将它放入你的page.tpl.php:

打印$ foo_sidebar;

在Drupal 7中,您要添加的所有区域都必须使用render和页面变量打印:

print render($ page ['foo_sidebar']);