I see a field for the comment author if one is being notified of a new comment, but I'm looking for a way to name the author or the updater of the content itself. I don't see fields for this - is there an obvious way to do it that i'm missing, or is this actually a feature request?

Thanks!

Comments

salvis’s picture

catya: here's my reply to you on IRC (you're not on-line anymore):

catya: Are you a troll or what? Why do you pester the IRC about a well-supported contrib module instead of using its issues queue?
"so on the mail templates for subscription, there's a field !comment_name that shows who authored a comment. any clues on whether/what the field would be for a node author / editor?"
On the very same page where you found !comment_name, it says
Usable variables are:
[...]
!sender_name — The name of the sender.
Ok, "sender" is not "author", the wording is defined by Mail Editor, not by Subscriptions, but from the context it ought to be clear.

webchick: "you'd need to read the source code surrounding that message to see if that's one of the things it lets you type in."
No, there's no need to read source code; it's all there on the form, if only catya could read plain English...

As for your initial question on IRC, which led to an hour-long thread (including mis-information from various people):

2.0beta7had a mail template field on the subsribe pages themselves in addition to over in mail template - 2.1 doesn't, but it's still somehow looking at what i had in that field.

This is clearly not true. No Subscriptions 2.0 beta version ever had such a thing. That "other" mail template must have come from a previous Subscriptions 1.x-dev installation. If you install -dev versions rather than waiting for a release version, then you're clearly taking higher risks and assuming additional responsibilities.

The #drupal IRC channel is not a support channel, not for core and even less for contributed modules. If you need support for a contributed module, you should create a support request in its issues queue.

Posting stuff like

<catya> *pokes around*

as if Subscriptions needed "poking around" to make it work is unacceptable.

I believe I'm doing a pretty good job here, pouring hundreds of hours of my spare time into Subscriptions, and I intend to support even border-line situations like upgrading from 1.x-dev (see #261002: Upgrade from 1.x-dev: the 2.0 mail templates aren't used), but if you go around and spread false information and bad feelings instead of bringing the real issues to the attention of those who can address them, then you're really not helping.

catya’s picture

Yikes, I'm sorry to have offended! I think it's a great module and certainly didn't mean to cause any trouble with it, or to take my questions to the wrong place, or to demean your work. It's not entirely clear where to go to ask questions in complicated situations, or at least not entirely clear to me, and i (apparently mistakenly) had been told that asking questions on #drupal was ok.

My "poking around" comment was simple in response to the suggestion that I go look at something in the module code - i was poking around the code looking for it, acknowledging that i was doing as suggested.

I did try !sender_name before i went looking for help, since it seemed like a good guess and i do in fact read plain english, but it did not appear to work - I just double checked it by adding:
sender name: !sender_name
recipient name: !recipient_name
to the bottom of the subscriptions-node-type-page template.

I got in the email:
sender name: !sender_name
recipient name: catya

Additional apologies for my misunderstanding about 2.0beta - the install i had, which said it was 2.0 beta, did have this field - perhaps it was a holdover in the 2.0beta install from an earlier version? Certainly I wasn't intending to spread any misinformation about it, i should have been more clear that i was talking about my install specifically.

Again, my apologies for offending, and appreciation for your work on this.

salvis’s picture

Thank you for your reply and for putting things in perspective.

The #drupal channel's announcement lists Type 'support?' for help, and usually people with support questions at the user/administrator level (vs. the developer level) get this typed for them, and Druplicon replies:

#drupal is for all questions about code and also about everything pertaining to drupal.org and the Drupal community at large (advocacy, marketing, infrastructure etc.). Other questions should be asked in #drupal-support or on the drupal.org forums.

On second look I'm surprised to see that it doesn't even mention the issues queues. Maybe that's on purpose, to keep the module maintainers from getting swamped with random support requests, but if you have a module-specific question/issue/request, then the Support links on that module's page are your best choices, because they go directly to those people who are best qualified to handle your request. Of course, if you don't get a reply within a reasonable time, you have to look elsewhere.

I did try !sender_name before i went looking for help, since it seemed like a good guess and i do in fact read plain english, but it did not appear to work

Ok, I'm sorry about my nastiness. You didn't give any indication that you had tried that, and I can't remember anyone reporting that !sender_name didn't work. We need to find out why it doesn't work for you.

Actually, I'm puzzled as to why you have to "add" this to the template, because it's part of the default template. It should be there from the start — every installation gets it and everyone has it filled in for them. After you removed the old templates from the {variable} database table, the 2.x templates are being used now, right?

I was just going to suggest that you uninstall (not just disable) and reinstall 2.1 to get the default 2.x templates back, but I'm just now realizing, that even though the uninstall function now removes the old template variables, it still doesn't remove all of the 2.0 templates (some are stored in the {mail_edit} table), so I still don't have a way to guarantee a clean install without any holdovers. I'll be back with an update, hopefully later today...

the install i had, which said it was 2.0 beta, did have this field - perhaps it was a holdover in the 2.0beta install from an earlier version?

Can it be that you have (or had) the files of the old Subscriptions 5.x-1.x-dev still somewhere in/below your modules or sites/.../modules directories? Drupal finds .module files no matter how deep down you try to hide them.

I'm looking at BETA7 right now, and it has 'subscriptions_email_body' in only one place inside the subscriptions_mail_cron() function, which runs from the cron job to periodically send out the queued notifications. There is no way that the old template can appear in the user interface, unless your installation is seriously broken. Starting from BETA1, Subscriptions 2.0 has used the Mail Editor module to edit its templates and has stored them in the {mail_edit} and {subscriptions_mail_edit} tables. It tried to use those old variables if it found them, but it has never provided an interface to edit them.

As explained above, you either upgraded from 1.x-dev or you had at some time installed 1.x-dev, and you customized its mail template at some point. That's the only way to get those templates into the {variable} database table. This can be a long time ago — there's no reliable way for 2.x to tell whether 1.x has been in active use until 2.x's installation time or not.

We'll get this sorted out eventually...

catya’s picture

Thanks for the note.

Someone else I was working with did the original subscriptions install, and it seems entirely possible that it was a 1.x version that he then upgraded to the 2.0 beta. I think that part is taken care of at this point, unless you think it could be effecting the sender_name?

Here's what I have for template for subscriptions-node-type-page:

| Greetings, !name.
|
| Your subscription on !site
| notifies you of {{!is_new==0?:a new post:
}}{{!is_updated==0?:an updated post:
}}{{!is_old==0?:new comments:
}}|
{{!is_published==1?:| ***** This post is unpublished! *****
}}{{!term_name==!term_name?:| Category: !term_name
}}{{!sender_name==!sender_name?:| Author: !sender_name
}}{{!sender_has_contact_page==0?:| Contact: !sender_contact_page
}}| Title: !title
{{!is_old==1?:
!teaser

}}| Link: !url
| Direct unsubscribe link (!subs_type):
| !unsubscribe_url
{{!has_new_comments==1?| --------------------------------------------------------------------
!comments:}}| --------------------------------------------------------------------
| This is an automated message. Please do NOT reply to the sender address!
| To manage your subscriptions go to
| !manage_url

sender name: !sender_name
recipient name: !recipient_name

That should all be default except for the two fields at the bottom.

for a page edit (done under a different login), I get in email:

| Greetings, catya.
|
| Your subscription on The Cohousing Association of the United States
| notifies you of an updated post:
|
| Title: subscriptions test

subscriptions test

content change test

content change test 2

content change test 3

| Link: http://www.cohousing.org/node/1131 | Direct unsubscribe link (content type): | http://www.cohousing.org/s/del/node/nid/1131/-1/3/e2b76516fdd11544da7e97d2dcc26510 | -------------------------------------------------------------------- | This is an automated message. Please do NOT reply to the sender address! | To manage your subscriptions go to | http://www.cohousing.org/user/3/subscriptions sender name: !sender_name recipient name: catya

-------------------
Further edit:

I did just get another subscription mail using the forums template rather than the page template - it DID fill in !sender_name, but it filled it in with the original author of the post, not the person who did the update.

[What I'm trying to do here is be able to tell from the subscription mail who did it, so i know whether to go look at it and make sure it's ok or not - bunch of new content contributors coming online in a few weeks that i need to keep an eye on.]

salvis’s picture

Ah, I see, apparently the content type that you tried before has the author name suppressed on the website, right? In that case, !sender_name is not set — this is by design.

If you have a post by A, and B updates it but keeps A's name, then !sender_name is still A. You'd like to see B in that case?

P.S. Just be sure that whoever worked on the site didn't move the old 1.x-dev files to some other directory where Drupal can still find them. I've done this myself once, and it can cause weird problems.

catya’s picture

Ah, fascinating. And yeah, I'm looking for B - am i out of luck? :)

I'll take a pass through for those files.

salvis’s picture

Yes, I'm afraid B is not available.

Maybe it could be retrieved, if revisions are active, but it would require an additional query per node during the cron job, so this would have to be optional. I don't know if it's possible at all with comments. This is a bit much for a feature that's pretty far away from the mainstream.

Subscriptions is aimed at normal users and not really intended as a supervisor tool.

P.S. I found a way to add a remark to the description of !sender_name, that it's only available if the sender name is visible.

catya’s picture

OK - thanks for your help!!

salvis’s picture

Status: Active » Closed (won't fix)

So, "won't fix" in the end — sorry...