Download & Extend

og2list 5.x-HEAD breaks comment edit form (it just displays "Array")

Project:Organic groups list manager
Version:master
Component:Code
Category:bug report
Priority:normal
Assigned:damien_vancouver
Status:closed (fixed)

Issue Summary

og2list has its own comment_edit hook which was mainly copied from comment.module's comment_edit. But the return value of comment_edit() changed between Drupal 4.7 and Drupal 5 API's and now og2list breaks the comment edit form.

In Drupal 4.7 it the return value of comment_edit() was the result of the comment_form() function (http://api.drupal.org/api/4.7/function/comment_edit):

return comment_form((array)$comment);

In Drupal 5 however it the returns comment_form_box() function (http://api.drupal.org/api/5/function/comment_edit):

   return comment_form_box((array)$comment);

To replicate the problem, enable og2list and comment modules and then create a node, comment on it, and then try and edit the comment. You will see the word "Array" instead of the edit form elements.

The attached patch against v1.106 modifies the two places in og2list_comment_form_edit() so that they return comment_form_box() instead. This fixes the problem and the edit form appears properly. I think it should be RTBC, have a look please!

AttachmentSize
og2list_comment_form_box.patch990 bytes

Comments

#1

Status:needs review» fixed

applied

#2

Status:fixed» closed (fixed)
nobody click here