Attached is a patch which fixes the problems with comment.module and mailhandler. It replicates comment_post() in mailhandler (as mailhandler_comment_post), nixing the drupal_gotos at the end of comment_post so that it can be auto run by cron without stopping.

Also fixed a minor SQL bug (missing comma on line 535).

CommentFileSizeAuthor
#1 mailhandler_corrected.patch9.31 KBjoshk
mailhandler_0.patch9.31 KBjoshk

Comments

joshk’s picture

StatusFileSize
new9.31 KB

Here's a patchfile that's not backwards.

moshe weitzman’s picture

please submit a patch to comment_post instead. We don't want to maintain all that comment code in mailhandler

killes@www.drop.org’s picture

The problem is that mailhandler and listhandler are broken for 4.5 without this patch. Even if we would convince Dries to accept a patch to comment.module for the 4.5 branch our module swould be unusable until the release of 4.5.2.

moshe weitzman’s picture

ok. then someone is welcome to check this code into 4.5 branch. please don't check it into HEAD. Instead, refactor comment_post()

Steve Dondley’s picture

You don't know how many hours of my life I lost trying to get mailhandler/listhandler to work. I ended up tracking it down to this bug (which I didn't know about until now). I came here to post my own patch for it.

Can some PLEASE put a note in the INSTALL.txt file to use this patch? It will save other people the nightmare I went through. I spent countless hours trying to figure out what was wrong with my mail list settings/mailhandler settings before I figured out it was a bug.

Again, please, for other people, make a note in the INSTALL file about this patch.

Steve Dondley’s picture

NOTE: Hunk 3 failed on latest version of mailhandler.module.

handelaar’s picture

Yeah, he's not wrong.

The patch fails.

drumm’s picture

Assigned: joshk » drumm

I will be testing and committing this as instructed in update #4.

drumm’s picture

Project: Mailhandler » Drupal core
Component: Code » comment.module
Assigned: drumm » Unassigned
Category: bug » task

Committed to 4.5.

Now who is going to fix it in CVS before 4.6?

Sumary: comment_post uses drupal_goto() which horrilbly confuses any module which tries to post comments programmatically.

moshe weitzman’s picture

Status: Active » Fixed
Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)