Error:
warning: Missing argument 3 for drupal_process_form(), called in /var/www/climateimc.org/httpdocs/sites/all/modules/spam/spam.module on line 1090 and defined in /var/www/climateimc.org/httpdocs/includes/form.inc on line 391.

Happened when approving feedback'd spam. Didn't seem to cause any problems though. Not sure what should be added there.

http://api.drupal.org/api/function/drupal_process_form/6

Comments

jeremy’s picture

Status: Active » Postponed (maintainer needs more info)

Are you still able to duplicate this with the latest beta release? I'm unable to duplicate it, and that line in the code is no longer relevant.

gnassar’s picture

Error confirmed. New line number off of HEAD is 1118.

gnassar’s picture

Status: Postponed (maintainer needs more info) » Active
Tony Sharpe’s picture

Version: 6.x-1.x-dev » 6.x-1.0

I'm getting this with 6.x-1.0. I've had some Comments that were wrongly marked as Spam and when I went to publish them I got:
warning: Missing argument 3 for drupal_process_form(), called in ............./public_html/sites/all/modules/spam/spam.module on line 1118 and defined in ........./public_html/includes/form.inc on line 391 (Drupal 6.12)
The spam only appeared in content management -> spam -> feedback, nothing in content management -> comments -> approval queue or content management -> comments -> spam.
The comments are now lost and the spam screen didn't tell me which user had posted them.
I was getting this error with a recent 6.x dev as well but I've re-tested after upgrading and still getting it with 6.x-1.0 so currently I have no way of publishing anything that gets marked as spam when it isn't.
You have said that you need more info - what can I tell you that might help?

Tony Sharpe’s picture

Further information. This problem has always occurred when going through Admin-> content management -> spam -> feedback -> view feedback item -> 'publish content' button. I have once successfully published it from the Admin-> content management -> spam -> list page but most of the time the spam is no even showing up here. I'm trying to get some consistency and some method of duplicating this problem.

jeremy’s picture

Status: Active » Fixed
Tony Sharpe’s picture

Thanks for the fast response. The error has gone away but I now get the following:
For a spam comment:
"Validation error, please try again. If this error persists, please contact the site administrator.". The spam item remains in the list, same again if you try again. Nothing in watchdog.

For a spam Forum topic: No error, says it's published, but it doesn't appear, uven in unpublished state.

These are both working from Admin-> content management -> spam -> feedback -> view feedback item -> 'publish content' button. Nothing appears in the Admin-> content management -> spam -> list page or the Admin-> content management -> comments ->approval queue or Admin-> content management -> comments ->spam
Thanks
Tony

gnassar’s picture

Yeah, I ran into similar issues. I thought I had a quick bug fix when I found the error location earlier, but it seems that the proper contents of form_state weren't immediately obvious. Then again, it wouldn't be the first time I've been frustrated by the Forms API, so maybe it is clearer to others. But my fix didn't test right.

On a side note, maybe making some unit tests for basic functionality should be in the long-term goals list? It is a pretty big module, after all.

jeremy’s picture

Status: Fixed » Active

Reopening the issue, as it does not appear to be completely solved yet.

Steve Dondley’s picture

I'm also getting the validation error.

gnassar’s picture

Will re-address after http://drupal.org/node/544260.

gnassar’s picture

New line nos for the error:
warning: Missing argument 3 for drupal_process_form(), called in /.../sites/default/modules/spam/spam.module on line 1128 and defined in /.../includes/form.inc on line 397.

gnassar’s picture

Any ideas on the proper value for the third argument so this works? Are we just going to have to serialize the form_state along with the form when we save it, and pull it back out here? (I'm guessing "yes.")

butler360’s picture

Also getting line 397.

fmosca’s picture

subscribe

scromie’s picture

I have also seen this happen on our site. This module has been really helpful! The issue though is that our users enter contests by putting comments on posts, and with the inability to revive non-spam, they miss out on the entry. Is there any time period where we can see this resolved by?

Thanks!

gnassar’s picture

Some discussion of this on #932758: "Teach filters selected comments are not spam" does nothing.

edit: Discussion has been moved back to this topic, for the purposes of a review of Forms API code in the module in general.

gnassar’s picture

Title: Missing argument 3 for drupal_process_form(), » Missing argument 3 for drupal_process_form() - forms code not fully ported to API 2.0 meta-ticket
Version: 6.x-1.0 » 6.x-1.x-dev
Priority: Normal » Major

The Forms 2.0 compliance is looking to be a much bigger problem than I thought, looking at the code base.

Current issues holding for Forms 2.0 cleanup:

#932758: "Teach filters selected comments are not spam" does nothing
#703346: Submitted feedback all maps to user Guest
#944850: while saving a node the whole node will saved in session also if node chicking is disabled - bug fixed, but implies continued use of large amounts of session data.