Missing Parts to Messages

MedMan - December 23, 2008 - 22:02
Project:Mail Comment
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I am using Messaging/Notifications/Token/Mail2Web/Mailhandler to provide email capability to my Forums. The combination is working correctly except I am getting seemingly random problems with items missing from my outgoing emails. In particular:

The Subject is sometimes blank. It is set to display [term]. Usually it does, but 20% of the time it leaves a blank.

When the message is a comment the Message Content is set to display [comment-body] It usually does, but sometimes it displays n/a instead.

Any suggestions as to the possible cause of this problem would be gratefully received.

#1

David Goode - December 24, 2008 - 15:50

Hello,

Try to discern what settings are different 20% of the time. What types of notifications and send methods are in use, and which ones aren't working? Please attempt to isolate the problem to one of the 5 modules you mention in the stack. For instance, adding plaintext as well as tokens to your message templates would be helpful in determining whether it is the template or the token values that are being improperly filled. Also, make sure your messaging templates don't set a blank under any circumstances, and try overriding the default for any problematic send methods to see if that makes a difference.

David

#2

MedMan - December 26, 2008 - 09:42

There are two elements that are sometimes missing. In both cases the missing text is a token value.

My Messaging Templates do contain plain text as well as tokens. The plain text is never missing.

The two tokens that sometimes fail are [term] and [comment-body]. Both occur alongside some plain text. The plain text always appears.

The biggest problem is with the Notification of Comments. If a comment is made on line the Notification is always delivered correctly. If the comment is made by email, Mailhandler uploads it correctly (as far as I can tell) and it appears on-line as expected. However, the Notification often (but not always) fails in that the [comment-body] field is replaced with n/a.

I have searched the various php files involved to try to discover the text string "n/a" but I cannot find it anywhere. I guess it must be put there as a result of a conditional statement somewhere, but I can't find it! If I could find out where it is coming from it might help to work out what is going wrong in the process.

I have wondered if the problem is Input Formats but I can't see anything wrong with my set-up. I have a separate 'Mailhandler HTML' Input Format for use with Mailhandler which limits the HTML to very basic formatting tags. (This is to prevent un-closed tags from breaking my pages) However, if a User answers on-line the Input Format is 'Filtered HTML' which is more or less Drupal out-of-the-box. The Filtered HTML format is the site default. All Roles have access to the Mailhandler HTML. Messaging uses the plaintext filter which comes with the Messaging module. All roles have access to that as well. My only sending method is Mail using the built-in Drupal mailer.

The missing [term] in the Subject line always happens under identical circumstances. Normally the outgoing Notification is delivered immediately (as set to do so) and the [term] is where it should be in the Subject line. From time to time the outgoing Notifications is not delivered for about 5 to 10 minutes. Whenever that happens the [term] is missing. The rest of the Subject line is present as normal. The Template line for the Subject is: [[term]] Re: [title] When it fails, what I get is: [] Re: Node Title i.e the plain text and the other Token are rendered but the [term] is not.

#3

jmcclelland - January 27, 2009 - 18:39

I'm having the same problem (only having it consistently). When notification is triggered by mail2web, the comment body is resent with "n/a" in place of comment-body - can't find that string anywhere either.

#4

jmcclelland - January 27, 2009 - 19:02

As for the modules in use:

  • mail2web is importing the comment (the problem does not happen when a comment is posted directly to the site)
  • I only have the Simple Mail delivery module installed
  • I added: Node comments mail: [comment-body] to the Notifications for node comments -> Content -> Mail box and in the email, the body had: "Node comments mail: n/a" - so it seems like it's pulling the template from the right place.

#5

Jose Reyero - January 29, 2009 - 22:37
Project:Messaging» Mail to Web
Version:5.x-1.1» 5.x-1.0-beta1

> When notification is triggered by mail2web, the comment body is resent with "n/a"

Umm, it may not be fully updated for this dev version of Notifications, as we've done some changes to the templatting.

Ian, could you take a look at this one?

#6

Ian Ward - February 1, 2009 - 15:15

I am not able to get this to repeat. Medman and jmcclelland, are you both using the beta version for 5, or the dev version for 5? Also, did you enter any commands in the "commands" section for the mailhandler mailbox settings or did you leave it blank?

#7

MedMan - February 1, 2009 - 22:59

dev version. No commands.

Since disabling both filters I have no longer had n/a appear which is a great relief. However, I do still get [] instead of [term] on an intermittent basis. I have pasted below the relevant Headers from two emails sent within 20 minutes of each other on the same thread. One displays [term] correctly, the other does not.

I ought to add that I upgraded to the newest dev last night: these emails were from this morning so the problem is still there.

-------- Original Message --------
Subject: [] Re: Front Page Module
Date: Sun, 01 Feb 2009 19:45:11 +0100
From: Forum Manager

(((Message from CA Forums: Reply above this line to post a comment)))

-------- Original Message --------
Subject: [Web Group] Re: Front Page Module
Date: Sun, 01 Feb 2009 19:25:15 +0100
From: chris

(((Message from CA Forums: Reply above this line to post a comment)))

P.S. 2257: I have just discovered 5.x-1.0-beta2 and upgraded. I will keep you posted.

#8

MedMan - February 1, 2009 - 23:27
Version:5.x-1.0-beta1» 5.x-1.0-beta2

Problem has just occurred with 5.x-1.0-beta2

-------- Original Message --------
Subject: [] Panels Module
Date: Mon, 02 Feb 2009 00:25:19 +0100
From: David Teall

(((Message from CA Forums: Reply above this line to post a comment)))

#9

Ian Ward - February 2, 2009 - 13:39
Status:active» postponed (maintainer needs more info)

I've tested for this on mail2web beta2, and am unable to repeat it. David, can you confirm you are running the latest stable releases for notifications, messaging, as well as mailhandler? If so, could you try to further narrow in on controlling the symptoms? Both [term] and [comment-body] worked fine for me whether posting on the site, or triggered by replying to a notification. Perhaps try using the default input formats and see if that changes anything, or any other changes you've made from a default install.

Thanks
Ian

#10

MedMan - February 2, 2009 - 23:23

I am running the latest stable releases for notifications, messaging and mailhandler. They work fine for me 9 times out of 10 - it is the odd 10% when it doesn't that is frustrating. There is no easy logic to when it happens.

I'm not sure what you mean by default input formats as it is no longer easy to tell what came from where. As far as I know there is no default input format for mailhandler. Could you expand a little?

#11

sagannotcarl - February 23, 2009 - 23:15

I have been dealing with this issue for with the body text (I'm not using term token). As jmcclelland figured out here #349730: Notifications sometimes Blank the issue turned out to be that the token module is improperly checking for access permissions on input filters. My issue was that when cron was triggering the notification being sent out, since cron runs as an anonymous user token was choking on input filter access permissions and returning 'n/a'.

Using [comment-body-raw] fixed my problem, and allowed me to still use my input filters. Try also just using [term-raw] instead and see if that works for you.

As for why it's only not working 10% of the time I don't really know. Maybe 90% of the time who/whatever is triggering the notification (I don't know what the system workflow looks like for immediate sending rather than cron) has permission to use the input format?

#12

MedMan - February 24, 2009 - 22:53

A couple of useful ides - thanks. I will investigate who has which filter permissions and then try out using term-raw and report back.

#13

sagannotcarl - May 18, 2009 - 03:11
Status:postponed (maintainer needs more info)» fixed

This issue is probably obsolete with the new versions. I'm marking it fixed, feel free to reopen if you want.

#14

System Message - June 1, 2009 - 03:20
Status:fixed» closed

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

#15

Ian Ward - November 16, 2009 - 18:04
Project:Mail to Web» Mail Comment
Version:5.x-1.0-beta2» 5.x-1.x-dev

Switch to mailcomment project. Mail2web is now known as "mailcomment" due to a trademark issue with the name mail2web.

 
 

Drupal is a registered trademark of Dries Buytaert.