Download & Extend

Contact reporting functions missing from mollom.pages.inc

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

Title:Reporting a contact submission as inappropriate by pressing the link in the e-mail fails» Contact reporting functions missing from mollom.pages.inc
Version:6.x-1.10» 6.x-1.x-dev
Priority:normal» critical
Assigned to:Anonymous» Dave Reid
Status:active» needs review

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.

AttachmentSizeStatusTest resultOperations
602044-mollom-contact-report-missing-D6.patch5.28 KBIgnored: Check issue status.NoneNone

#2

Status:needs review» needs work

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

Status:needs work» fixed

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

Status:fixed» closed (fixed)

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