hi,

i've been trying to debug why comment threading is not working on my site. i'm now looking at how mailhandler.module code interacts with listhandler.

I'm not seeing where mailhandler sets $node->tid anywhere, and the listhandler_mailhandler hook is relying on $node->tid to decide whether or not to process the node further. This could be by design where node->tid is set elsewhere but I'm not understanding how.

NOTE: if I add a line in mailhandler_process_message where i set $node->tid to the first term in the taxonomy list, I'm able to do comment threading for ONE mail submission. after that, no further comments are posted, it seems like they are ignored.

Well I'm stuck for now so any tips to help me along would be appreciated

------------------
function listhandler_mailhandler($node, $result, $msg_number, $header, $mailbox) {
global $base_url;

_listhandler_debugfunc("listhandler: entered listhandler_mailhandler function \n");
_listhandler_debugfunc("listhandler: node-tid is $node->tid \n");

if ($node->tid) { // If no tid is assigned, then the mail is not comming through a mailhandler enabled list. Do nothing.

^------- is this comment correct???

Comments

philipnet’s picture

Status: Active » Postponed (maintainer needs more info)

Hi ssutankayo,

$node->tid is set - or appears to be set - at line 257 of mailhandler.module in the current release.
It spends the previous lines adding the commands to $body and then decoding them line by line and setting the appropriate $node->xxx values.

One of the best forms of debugging is by including the code:
print_r($node);
where you want to see what's set (or not) and the structure of the data being handled; in this case: $node.
(However it is a security risk to use print_r([anything]) on a production site).
You might want to try:
print_r($node->tid);
in listhandler_mailhandler() to see if $node->tid is set, and to what.

Regards.

P.

philipnet’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

No further response.