diff --git a/core/modules/node/node.module b/core/modules/node/node.module index a8050b2..e496060 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -1170,10 +1170,12 @@ function template_preprocess_node(&$variables) { $variables['page'] = $variables['view_mode'] == 'full' && node_is_page($node); // Make useful flags and node data available. - // @todo: Check if all are required. - $properties = array('type', 'comment_count', 'uid', 'created', 'promote', 'sticky', 'status', 'comment', 'readmore'); + // @todo: The comment properties only exist if comment.module is enabled, but + // are documented in node.tpl.php, so we make sure that they are set. + // Consider removing them. + $properties = array('type', 'comment_count', 'uid', 'created', 'promote', 'sticky', 'status', 'comment'); foreach ($properties as $property) { - $variables[$property] = $node->$property; + $variables[$property] = isset($node->$property) ? $node->$property : NULL; } // Helpful $content variable for templates. diff --git a/core/modules/node/templates/node.tpl.php b/core/modules/node/templates/node.tpl.php index b1da4aa..ca9a75b 100644 --- a/core/modules/node/templates/node.tpl.php +++ b/core/modules/node/templates/node.tpl.php @@ -58,8 +58,6 @@ * - $sticky: Flags for sticky post setting. * - $status: Flag for published status. * - $comment: State of comment settings for the node. - * - $readmore: Flags true if the teaser content of the node cannot hold the - * main body content. * - $is_front: Flags true when presented in the front page. * - $logged_in: Flags true when the current user is a logged-in member. * - $is_admin: Flags true when the current user is an administrator. diff --git a/core/themes/bartik/templates/node.tpl.php b/core/themes/bartik/templates/node.tpl.php index accc60d..8467a4d 100644 --- a/core/themes/bartik/templates/node.tpl.php +++ b/core/themes/bartik/templates/node.tpl.php @@ -58,8 +58,6 @@ * - $sticky: Flags for sticky post setting. * - $status: Flag for published status. * - $comment: State of comment settings for the node. - * - $readmore: Flags true if the teaser content of the node cannot hold the - * main body content. * - $is_front: Flags true when presented in the front page. * - $logged_in: Flags true when the current user is a logged-in member. * - $is_admin: Flags true when the current user is an administrator.