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.
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?
Comment | File | Size | Author |
---|---|---|---|
#5 | zen_fix.patch | 733 bytes | aspilicious |
Comments
Comment #1
Breakerandi CreditAttribution: Breakerandi commentedsame problem here..
Comment #2
Breakerandi CreditAttribution: Breakerandi commentedyour solution works for me.. I exchanged date and created, and now everything works.. this should be commited!!
Comment #3
mgiffordI ran into this problem as well.
Also found a duplicate #818986: template.comment.inc and added a reference to this (as the authoritative thread).
Comment #4
ChrisRL CreditAttribution: ChrisRL commentedI also had this problem, and fixed it the same way.
Comment #5
aspilicious CreditAttribution: aspilicious commentedMade a patch easier to fix ;)
Comment #6
aspilicious CreditAttribution: aspilicious commentedComment #7
JohnAlbinIt should be removed. Thanks for the bug report! :-)
Fixed in CVS.
Comment #10
apaderno