theme_comment_wrapper creates an empty div when there are no comments. Remove the empty div. I am using the following change on one site in 5.0.

From:

function theme_comment_wrapper($content) {
  return '<div id="comments">' . $content . '</div>';
}

to:

function theme_comment_wrapper($content) {
	if(trim($content) == '')
		{
		return '';
		}
  return '<div id="comments">' . $content . '</div>';
}

petermoulding.com/web_architect

Comments

Zen’s picture

Category: feature » bug
Priority: Normal » Minor
Status: Active » Needs work

Confirmed. Please submit your change in patch form. Please also search drupal.org for code style guidelines (or follow examples from core) and clean up your patch prior to submitting.

Thanks Peter :)
-K

dmitrig01’s picture

Status: Needs work » Active

yup

dpearcefl’s picture

Is there any interest in pursuing this issue?

handrus’s picture

Assigned: Unassigned » handrus
Status: Active » Fixed

This is already fixed on D6.

What is the point in the version chosen there? By the comments it sounds like it was opened on version 5.

comment.module - line 1053

    if ($output) {
      $output = theme('comment_wrapper', $output, $node);
    }

Closing it.

Status: Fixed » Closed (fixed)

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