Posted by rehos on October 12, 2009 at 7:49am
| Project: | Mollom |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Dave Reid |
| Status: | closed (fixed) |
Issue Summary
Reporting a contact submission as inappropriate by pressing the link in the e-mail fails with the following error message:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'mollom_report_contact' was given in ...../includes/form.inc on line 371.
The item is declared at line 89 (code snippet below) of the file mollom.module. However the file mollom.pages.inc doesn't contain the function mollom_report_contact.
$items['mollom/contact'] = array(
'title' => 'Report',
'page callback' => 'drupal_get_form',
'page arguments' => array('mollom_report_contact'),
'access callback' => '_mollom_access',
'file' => 'mollom.pages.inc',
'type' => MENU_CALLBACK,
);I'am using mollom version 6.x.1.10 with Drupal 6.14.
Comments
#1
Thank you for reporting this. Apparently when we split the code into mollom.admin.inc and mollom.pages.inc, we lost the contact reporting functions. Since we didn't have tests covering the reporting paths, we never noticed this. Please review the attached patch. I'm working on revising most of the test logic for cleaner and re-usable tests and adding tests for all the report pages is a huge priority now.
#2
Committed to CVS. Leaving as needs work until tests can be written for this. Still a high priority to complete.
#3
Thanks for supplying the patch. The patch works great. I have tested the patch for reporting inappropriate contact submissions.
#4
Marking as fixed in favor of #612068: Reporting mail as spam as we're not currently inserting the report to Mollom link in any e-mails.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.