* Notice: Undefined variable: unpublished in include() (line 3 of /home/xxx/xxx.com/sites/all/themes/omega/omega/omega/templates/comment.tpl.php).
* Notice: Undefined variable: datetime in include() (line 21 of /home/xxx/xxx.com/sites/all/themes/omega/omega/omega/templates/comment.tpl.php).

I did also notice all the omega folders, this happened when I upgraded from beta 1 --> beta 2 using drupals update function.

CommentFileSizeAuthor
#3 1062780.patch540 byteshimerus

Comments

himerus’s picture

Sadly, the update functions in core has a bug when using a theme like Omega, Fusion, or Adaptive Theme that store multiple themes (base, starterkit, etc) in the root directory of the theme....

The following issue demonstrates it: http://drupal.org/node/986616

Please remove the omega folder completely and download new version. I have to remove and redownload even via Drush too until this bug is fixed in core's update functionality.

If you can test that, and if the error persists, I'll look further into it.

tchilly’s picture

Still getting the errors :(
Did as you said remove the old folder, downloaded and extracted the beta 2.

* Notice: Undefined variable: unpublished in include() (line 3 of /home/xxx/xxx.com/sites/all/themes/omega/omega/templates/comment.tpl.php).
* Notice: Undefined variable: datetime in include() (line 21 of /home/xxx/xxx.com/sites/all/themes/omega/omega/templates/comment.tpl.php).
* Notice: Undefined variable: unpublished in include() (line 3 of /home/xxx/xxx.com/sites/all/themes/omega/omega/templates/comment.tpl.php).
* Notice: Undefined variable: datetime in include() (line 21 of /home/xxx/xxx.com/sites/all/themes/omega/omega/templates/comment.tpl.php).

himerus’s picture

Status: Active » Needs review
StatusFileSize
new540 bytes

This patch seems to solve the issue (i was able to replicate the issue locally)

The following code needs to be added to omega/omega/preprocess/preprocess-comment.inc

$vars['datetime'] = format_date($vars['comment']->created, 'custom', 'c');
$vars['unpublished'] = '';
if ($vars['status'] == 'comment-unpublished') {
  $vars['unpublished'] = '<div class="unpublished">' . t('Unpublished') . '</div>';
}
asrob’s picture

Status: Needs review » Reviewed & tested by the community

I reproduced that. It works flawlessly, thank you.

himerus’s picture

Title: Php varnings when posting a comment. » PHP warnings when posting a comment.
Status: Reviewed & tested by the community » Fixed

Marking this as fixed, and pushing in beta3 to follow shortly

Status: Fixed » Closed (fixed)

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