Anonymous user name/email/url not appearing

Dave Sherohman - April 23, 2009 - 09:09
Project:Comment Display
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Normally, in D6, once an anonymous user has submitted a comment, cookies are set allowing their name, email address, and homepage url to be automatically filled in when they return to comment again. With the Comment Display module active, the values from the cookies are not displayed in the comment form, forcing the user to re-enter them every time they comment. (Unless they register with the site, but not all sites allow open registration and not all usage models should require it.) I have verified that the cookies are present and that they populate the fields correctly with the Comment Display module disabled.

I'm assuming that, like #442566: Module breaks threaded comment display, this is a side effect of comment_render being called from a _preprocess_page callback instead of from _node_show, but I have not yet found a solution to resolve it.

#1

Dave Sherohman - April 23, 2009 - 09:24

I was looking in the wrong place - the comment HTML is generated fine by the Comment Display code, but comment.js isn't being sent to the client.

This can be resolved by adding

  if (function_exists('comment_render') && $node->comment) {
    drupal_add_js(drupal_get_path('module', 'comment') .'/comment.js');
  }

following the comment
// Note: Output of comments moved into comment_display_preprocess_page().
in comment_display_node_show.

Alternately, add

  if (function_exists('comment_render') && $node->comment) {
    drupal_add_css(drupal_get_path('module', 'comment') .'/comment.css');
    drupal_add_js(drupal_get_path('module', 'comment') .'/comment.js');
  }

to resolve both this issue and #442566: Module breaks threaded comment display.

 
 

Drupal is a registered trademark of Dries Buytaert.