Error:

Notice: Undefined index: date in _zen_preprocess_comment()  (line 19 of /Users/gareth/Sites/drupal7dev/sites/all/themes/zen/zen-internals/template.comment.inc).

Cause:

  // In Drupal 7, $date has been renamed to $created.
  $vars['created'] = $vars['date'];

If created already exists but date does not, should the code not read:

  // In Drupal 7, $date has been renamed to $created.
  $vars['date'] = $vars['created'];

Or be removed entirely unless there is a specific need for backwards compatibility?

CommentFileSizeAuthor
#5 zen_fix.patch733 bytesaspilicious
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Breakerandi’s picture

same problem here..

Breakerandi’s picture

your solution works for me.. I exchanged date and created, and now everything works.. this should be commited!!

mgifford’s picture

I ran into this problem as well.

Also found a duplicate #818986: template.comment.inc and added a reference to this (as the authoritative thread).

ChrisRL’s picture

I also had this problem, and fixed it the same way.

aspilicious’s picture

FileSize
733 bytes

Made a patch easier to fix ;)

aspilicious’s picture

Status: Active » Needs review
JohnAlbin’s picture

Status: Needs review » Fixed

It should be removed. Thanks for the bug report! :-)

Fixed in CVS.

Status: Fixed » Closed (fixed)
Issue tags: -date, -comment, -undefined index, -_zen_preprocess_comment

Automatically closed -- issue fixed for 2 weeks with no activity.

Issue tags: +date, +comment, +, +
apaderno’s picture

Component: PHP Code » Component markup (CSS/Sass/HTML/Twig)
Issue summary: View changes
Issue tags: -date, -comment, -undefined index, -_zen_preprocess_comment