Hi there I have been at this module for 2 days now : ( - I get the following error when importing "Unable to create comment with empty NID."
Config is
Mail Comment 7.x-2.2
Mailhandler 7.x-2.2
Notif/Messaging 7.x-1.0-alpha2
I have used both PHPMailer & SMTP
Under mailhandler = domain is "website.com"
Server string for Message Id = "website.com"
The ((( Reply ABOVE this LINE to POST a COMMENT ))) doesnt appear but i guess that can be added manually.
I do not know - what is wrong or how to fix the problem ( ive look at other similar post - but no avail) any guidance at this point would be greatly appreciated.
Comment | File | Size | Author |
---|---|---|---|
#12 | mailcomment-empty-nid-1889550-12.patch | 721 bytes | randallknutson |
Comments
Comment #1
Sylense CreditAttribution: Sylense commentedI have the same problem but it only happens when I use one of the filter modes (basic or aggressive). If I have no filtering selected then the comments import successfully but then I have a bunch of email gunk (signature, original message, etc) that I do not want imported. I think this is a major bug possibly with the regex somehow removing the NID before the import takes place resulting in a failed import.
Do you have a filter mode selected?
Comment #2
Sylense CreditAttribution: Sylense commentedComment #3
danshadow CreditAttribution: danshadow commentedThanks for your response, but unfortunately there is no filter : its set to ( No import filter. Leave messages as-is. )
Comment #4
Sylense CreditAttribution: Sylense commentedHmm...I'm using IMAP and my setup works fine with no filtering however, I do get this same error message when attempting to import comments with filtering turned on. I'm not sure how related the two issues are.
Comment #5
Cosades85 CreditAttribution: Cosades85 commentedI am faced with the same issue. My config is identical:
Mail Comment 7.x-2.2
Mailhandler 7.x-2.2
Notif/Messaging 7.x-1.0-alpha2
I have used both PHPMailer & SMTP
I'll add that the INSTALL.txt in /modules/mailcomment says the dependenciy on NOtif/Messaging is the 4-x branch:
- Notifications and Messaging (7.x-4.x branch)
Sylense, can you add any more details to your setup, or is it identical?
Thanks
Comment #6
malancheril CreditAttribution: malancheril commentedI have the same setup and the same issue as Sylense. I get the same message but only when basic or aggressive filtering is set. Has anyone found a solution or a workaround?
Comment #7
malancheril CreditAttribution: malancheril commentedThis might be an issue. In mail comment.module I noticed this comment:
* The message id should have this form:
* uid.nid.cid.time.signature@server string
When I turn off filters and create a new piece of content, my gmail account gets an email as expected. When I view "Original message" in gmail, I can see a line that says:
Message-ID: <1.20.0.1362587781.a503fbf34290d692a1704bcf63348c8a@myserver.com>
But when I turned on the filters, the message ID was different:
Message-ID: <51376eff.c79f320a.432b.1db3SMTPIN_ADDED_BROKEN@mx.google.com>
...which would cause the NID mismatch. Does this shed any light? Has anyone had a similar experience?
Comment #8
amourowthe same problem as @malancheril (#7) described.
Now the reply text cannot be stripped.
Comment #9
kristat CreditAttribution: kristat commentedSubscribe. Same problem
Comment #10
rob.barnett CreditAttribution: rob.barnett commentedI also had the same problem. mailcomment inserts a url at the end of the email comment like so:
View original post: http://example.com/mailcomment/redirect/%3C2506.38126.56232.1370016261.8....
But this url gets stripped by the filters.
By including the following function and adding the appropriate url back into the filter (mailcomment.module) the comment posts correctly for me.
Aggressive filter:
You also would need to concatenate the $urls array to the basic filter as well.
Comment #11
mudsurfer CreditAttribution: mudsurfer commentedHey Hurley - Thanks!
I'm an utter coding noob. I have now got mail comment working except for this filter problem, and it looks like your solution should be what I try next. Can you give a quick clue as to where in the mailcomment.module I put these changes? ie: does it matter where in the module that the additional function goes? I think I found the section that is the aggressive filter (under function_mailcomment_filter_aggressive($text)?) - but not sure where to paste these extra lines?
If easy for you to spit this out as a patch, I know how to deal with that (because it shows me the line numbers I need to play with :)
Comment #12
randallknutson CreditAttribution: randallknutson commentedJust ran into this. Attached is a patch that cleans up the code from #10 a bit and makes it more robust. I only fixed aggressive for now.
Comment #13
Dane Powell CreditAttribution: Dane Powell commentedTriggering automated testing.
Comment #15
Dane Powell CreditAttribution: Dane Powell commented#12: mailcomment-empty-nid-1889550-12.patch queued for re-testing.
Comment #17
Dane Powell CreditAttribution: Dane Powell commentedTrying to get tests running properly.
Comment #18
Dane Powell CreditAttribution: Dane Powell commented#12: mailcomment-empty-nid-1889550-12.patch queued for re-testing.
Comment #20
Dane Powell CreditAttribution: Dane Powell commentedLooks like #12 throws notices, and needs work.
Comment #21
Dane Powell CreditAttribution: Dane Powell commentedhttp://drupalcode.org/project/mailcomment.git/commit/691a843
http://drupalcode.org/project/mailcomment.git/commit/c346447
Comment #22
Dane Powell CreditAttribution: Dane Powell commentedI've reverted the commits in #21:
http://drupalcode.org/project/mailcomment.git/commit/38f1da19d149c3d2a9d...
http://drupalcode.org/project/mailcomment.git/commit/91287f04d809e4dd43f...
#1650796: Message body filtering strips thread token seems like a much more sane approach.